Private Sub Form_Load()
'Set the ScaleMode to Pixels
ScaleMode = 3
End Sub
Private Sub tmrMove_Timer()
If Counter1 >= 4 Then
MsgBox "Game Over...", vbInformation = vbOKOnly, "Pong"
Call Form_Load
End If
'Give focus to the scrollbar
vsbBatMove.SetFocus
imgMain.Left = imgMain.Left + Xinc
imgMain.Top = imgMain.Top + Yinc
'Right
If ScaleWidth <= (imgMain.Left + imgMain.Width) Then _
Xinc = Xinc * -1
'Bottom
If ScaleHeight <= (imgMain.Top + imgMain.Height) Then _
Yinc = Yinc * -1
'Top
If ScaleTop >= imgMain.Top Then _
Yinc = Yinc * -1
'Bat 'THIS IS WHERE I AM HAVING TROUBLE'
If imgMain.Left >= (shpLeftBat.Left) And _
imgMain.Left <= (shpLeftBat.Left + shpLeftBat.Width) And _
imgMain.Top <= (shpLeftBat.Top + shpLeftBat.Height) And _
imgMain.Top >= (shpLeftBat.Top) Then Xinc = Xinc * -1
Else
imgMain.Move 480, 240, 109, 97
Counter1 = Counter1 + 1
End If
End Sub