# 又是同步的问题

Posted by 小贤 on February 13, 1999 at 12:41:45:

我在写水波的问题时遇到了问题,程式Code 如下
Public R, cx, cy, deltaX
Private Sub Text1_Change()
End Sub

Public Sub Command1_Click()
Timer1.Enabled = True
drawwave Picture1.ScaleWidth / 2, Picture1.ScaleHeight / 2
End Sub

Sub Command2_Click()
End
End Sub

Public Sub drawwave(cx, cy)
Picture1.DrawWidth = 2
Do
DoEvents
rad = rad + 1
Picture1.AutoRedraw = True
Picture1.Cls
Picture1.Circle (cx, cy), rad
Picture1.AutoRedraw = False
Picture1.PSet Step(R, 0), QBColor(4)
Loop
End Sub

Private Sub Timer1()
Picture1.pset step( 30 ,0 ),Qbcolor(4)
Drawwave picture1.currentX , picture2.currentY
End Sub

我想用一个Timer 每1秒执行 Drawwave 一次,并往右移 30, 然后再执行一次 Drawwave
而且上次执行的Drawwave 的图形可以一直执行下去 但当 Timer 执行一次后,前一个
图形会被清除,而且Timer不会继续执行下去(看起来图形没有往右移动),这是为何?

Follow Ups:

- Re: 又是同步的问题 goose 02:24:24 2/15/99 (0)