|
-
March 12th, 2001, 08:43 PM
#1
Moving Picboxs
Does anyone have code to move a picbox from one side of a form to another. I am creating a little shooting range type game and would like to have the target(BMP) picbox move across the form.
-
March 12th, 2001, 09:35 PM
#2
Re: Moving Picboxs
Moving the picture box is not the approach to making games. The fastest you will attain using VB and the API is by putting your sprite on an invisible picturebox and use BitBlt() to copy the image to different parts of the form.
IF you still insist with moving the picturebox, the code below will do it.
form1.scalemode = 3 'Pixel
picture1.left = 0
for i = 0 to form1.scalewidth - picture1.width
picture1.left = i
next
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
|