|
-
Aug 12th, 2002, 03:48 PM
#1
Thread Starter
Addicted Member
1-Twip vs. 3-Pixel HELP!
Sub DoBall()
Speed = 5
xFlag = 1
yFlag = 1
If xFlag = 1 Then
Ball.X = Ball.X + Speed
Else
Ball.X = Ball.X - Speed
End If
If yFlag = 1 Then
Ball.Y = Ball.Y + Speed
Else
Ball.Y = Ball.Y - Speed
End If
If Ball.X >= Form1.width Then
xFlag = 0
End If
If Ball.X <= 100 Then
xFlag = 1
End If
If Ball.Y >= Form1.height Then
yFlag = 0
End If
If Ball.Y <= 100 Then
yFlag = 1
End If
End Sub
The above code works when Form property is set to 1-Twip, but when I change it to 3-Pixel the code no longer works. The ball flies of the form. Why? Please help!
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|