Private Sub Form_Load()
Me.Width = 10000: Me.Height = 9000
With Image1
.Width = Me.Width / 10
.Height = Me.Height / 10
.Top = Me.ScaleHeight - .Height
.Left = 0
End With
Timer2.Enabled = True '↗
Timer3.Enabled = False '↙
End Sub
Private Sub Timer1_Timer() '切换图片
Static Pick As Boolean
If Pick = False Then
Image1.Picture = LoadPicture(App.Path & "\Images\001.jpg")
Pick = True
Else
Image1.Picture = LoadPicture(App.Path & "\Images\002.jpg")
Pick = False
End If
End Sub
Private Sub Timer2_Timer() '↗
If Image1.Top < 0 Then
Timer2.Enabled = False
Timer3.Enabled = True
Else
With Image1
.Left = .Left + .Width
.Top = .Top - .Height
End With
End If
End Sub
Private Sub Timer3_Timer() '↙
If Image1.Top + Image1.Height > Me.Height Then
Timer2.Enabled = True
Timer3.Enabled = False
Else
With Image1
.Left = .Left - .Width
.Top = .Top + .Height
End With
End If
End Sub