ImgList(value).Length – i – 5)
ZoomIn()
End Sub
Private Sub ZoomIn()
Me.Top = picTop + (picHeight – 4) \ 2
Me.Left = picLeft + (picWidth – 4) \ 2
Me.Width = 4
Me.Height = 4
Me.Image = Image.FromFile(ImgList(picIndex))
AddHandler myTimer.Tick, AddressOf TimerEventZoomIn
myTimer.Interval = 10
myTimer.Start()
End Sub
Private Sub TimerEventZoomIn(ByVal myObject As Object, _
ByVal myEventArgs As EventArgs)
If Me.Top > picTop And Me.Width < picWidth Then
Me.Top -= 2
Me.Left -= 2
Me.Width += 4
Me.Height += 4
Else
myTimer.Enabled = False
picState = BallState.NORMAL_BALL
RemoveHandler myTimer.Tick, AddressOf TimerEventZoomIn
End If
End Sub
Public Sub Jump()
If picState = BallState.NORMAL_BALL Then
sign = 1
picState = BallState.JUMPING_BALL
AddHandler myTimer.Tick, AddressOf TimerEventJump
myTimer.Interval = 20
myTimer.Start()
ElseIf picState = BallState.JUMPING_BALL Then
StopJump()
End If
End Sub
Public Sub StopJump()
If picState = BallState.JUMPING_BALL Then
picState = 0
myTimer.Enabled = False
RemoveHandler myTimer.Tick, AddressOf TimerEventJump
Me.Top = picTop
Me.Left = picLeft
Me.Height = picHeight
Me.Width = picWidth
End If
End Sub
Private Sub TimerEventJump(ByVal myObject As Object, _
ByVal myEventArgs As EventArgs)