关于计时器的题目
题目:利用图像框和计时器设计一个简单的动画程序,(可以用两张连续的图片来做)代码:Private Sub Form_Load()
Timer1.Interval = 100
Image1.Left = 0
Image1.Top = Height - Image1.Height
Image2.Visible = False
Image3.Visible = False
End Sub
Private Sub Timer1_Timer()
Dim a As Integer
If a = 0 Then
Image1.Picture = Image2.Picture
a = 1
Else
Image1.Picture = Image3.Picture
a = 0
End If
Image1.Move Image1.Left + 100, Image1.Top - 50
If Image1.Left > Width Then
Image1.Left = -Image1.Width
Image1.Top = Height
End If
End Sub
谁帮我看看哪里不对啊?谢谢,非常感谢!