这主要是你调整了坐标系导致的实际图形复制只复制了上半幅,下半幅未复制到,而负数的图形是画到下半幅的。将图形拷贝起点坐标系修改如下,则无论正负均会左移(红色为修改部分):
Private Sub Timer_Timer()
DataFromComLast = DataFromCom
Randomize
DataFromCom = -CInt(1000 * Rnd)
TimeCount = TimeCount + 1
'对出边界的判断要提前,另15缇=1像素,这样不会出现除不尽的情况
If ((TimeCount + 1) * 60 > picBack.Width) Then
picBack.PaintPicture picShow.Image, -60,
-picShow.Height / 2, picShow.Width, picShow.Height, 0,
-picShow.Height / 2, picShow.Width, picShow.Height '从前台复制到后台
picShow.PaintPicture picBack.Image, 0,
-picShow.Height / 2, picShow.Width, picShow.Height, 0,
-picShow.Height / 2, picBack.Width, picBack.Height '从后台显示到前台是立即进行的
TimeCount = TimeCount - 1
End If
DrawRealLine picShow, TimeCount, DataFromCom, DataFromComLast 'OK
End Sub