请问一个擦除画线的方法
请问一下,如果我的程序,是根据循环画线,不停的在画,我想让上次画的线,当下次画线出现时,将上次画的线自动擦除,我改怎么做,我编了个试验程序,怎么实现不了,有错误
Option Base 1
Private Sub Command1_Click()
Dim i
Dim j(10000)
CurrentX = Picture1.Width / 2
CurrentY = Picture1.Height / 2
For i = 1 To 10000
DoEvents
j(10000) = Rnd
Picture1.Scale (1, 0)-(10000, 0.5)
Picture1.Line -(i, j(i)), RGB(255, 0, 0)
Unload Line
Picture1.PSet (i, j(i))
Next
End Sub
Private Sub Command2_Click()
Dim j
For j = 1 To 100
DoEvents
Command1_Click
Next
End Sub