(一个时间控件,和一个shape控件,(index从0到16))
Dim intX As Integer
Dim intY As Integer
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
intX = x
intY = y
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
For i = 16 To 1 Step -1
Shape1(i).Move Shape1(i - 1).Left, Shape1(i - 1).Top
Next
Shape1(0).Move intX, intY
End Sub
伍代豪洗吾洗我比代码你呀!窗口加载自己搞掂,吾好同我一样~
Private intX As Integer
Private intY As Integer
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
intX = x
intY = y
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
Dim r As Integer
Dim g As Integer
Dim b As Integer
For i = 4 To 1 Step -1
Shape1(i).Move Shape1(i - 1).Left, Shape1(i - 1).Top
r = Rnd * 255
g = Rnd * 255
b = Rnd * 255
Debug.Print r, g, b
Shape1(i).BorderColor = RGB(r, g, b)
Next
Shape1(0).Move intX, intY
End Sub