Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2d Moving Pics in Visual Basic 2005

Author
Message
Bullet
20
Years of Service
User Offline
Joined: 3rd Dec 2005
Location:
Posted: 21st Sep 2006 13:26
hey, i dont no if this is that relative to this site, but im gunna ask anyway, hopefully sumone can help.

i have a school assignment, its making a 2d game, using Visual Basic 2005

anyways i need to move a picture with the keys and i forget how to do it

i no its sumthin like

PICTUREBOX1.LOCATION = NEWPOINT (0,0) <--- Co-Ords there, but its not working and i 4 get wat to do, anyhelp would be appreciated

Thanks


[/b][b]
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st Sep 2006 18:40
Pretty sure you'd have to set the X and Y coords seperately, like affect the .Left and .Top attributes instead.

''Stick that in your text and scroll it!.''
Hayer
20
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 27th Sep 2006 19:37
mh-m...
Oki im using vb 05 myself but dont remember the code right now..

If rightbutton then
picturebox1.location = newpoint(,1+)
end if

or something...
That is probely total WRONG..

Mess with the bests, die like the restes!
dab
21
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 28th Sep 2006 07:44 Edited at: 28th Sep 2006 08:21
Quote: "PICTUREBOX1.LOCATION = NEWPOINT (0,0) <--- Co-Ords there, but its not working and i 4 get wat to do, anyhelp would be "


That's it.


Edit: That is if you don't have buttons, or textboxes or anything that uses input. If so, just add ,Formname.KeyDown with the "Handles " on the even to activate the same code with multiple controls.

Your mom has been erased by a mod from you telling too many "your mom" jokes.

Login to post a reply

Server time is: 2026-07-07 03:24:02
Your offset time is: 2026-07-07 03:24:02