drodriguez73
March 12th, 2001, 07:43 PM
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.
|
Click to See Complete Forum and Search --> : Moving Picboxs drodriguez73 March 12th, 2001, 07:43 PM 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. CK Dixon March 12th, 2001, 08:35 PM 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 codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |