- Home
·
- Games
·
- This bounces an object in a form. Can be used for many games.
This bounces an object in a form. Can be used for many games.
This bounces an object in a form. Can be used for many games.
API Declarations
dim DeltaX, DeltaY as Integer
Rate This bounces an object in a form. Can be used for many games.
(1(1 Vote))
img1.move img1.Left + DeltaY, img1.Top + DeltaX
If img1.Left < ScaleLeft Then DeltaY = 100
If img1.Left + img1.Width > ScaleWidth + ScaleLeft Then
DeltaY = -100
End If
If img1.Top < ScaleTop Then DeltaX = 100
If img1.Top + img1.Height > ScaleHeight + ScaleTop Then
DeltaX = -100
End If
'Make Sure Timer1.Enabled = True
Private Sub cmd1_Click()
Timer1.Interval = 50
DeltaX = 100
DeltaY = 100
This bounces an object in a form. Can be used for many games. Comments
No comments yet — be the first to post one!
Post a Comment