form1上放置Command1,Timer1,Picture1(装入一个图片)
Dim MoveStep As Integer
Private Sub Command1_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
MoveStep = 100
End Sub
Private Sub Timer1_Timer()
If Picture1.Left + Picture1.Width + 30 > Form1.Width Then
MoveStep = -100
End If
If Picture1.Left < 0 Then
MoveStep = 100
End If
Picture1.Left = Picture1.Left + MoveStep
End Sub