|
-
May 6th, 2001, 01:23 PM
#1
Thread Starter
Hyperactive Member
NEWBIE: making an object move on a form using arrow keys.
hello,
i am a newbie in vb6 game programming.(when i say newbie, i mean i'm starting from scratch . anyway, i want to know how i can make an object like an image move about on a form using the arrow keys.
thanks for any help. (this is the very first step into my game programming career...)
Visual Basic 6, HTML, JavaScript, learning C++
-
May 6th, 2001, 01:33 PM
#2
Frenzied Member
Set the form's KeyPreview property to True, and then in the form's KeyDown Event, you can check which key has been pressed and change the image's Top and Left properties to make it move around. You can check which key has been pressed by seeing what the value of KeyCode in the Form_KeyDown() event is. Check the help files for information about the key codes.
Harry.
"From one thing, know ten thousand things."
-
May 6th, 2001, 02:38 PM
#3
PowerPoster
Review this step of my tutorial 
oh and Harry: if it's an ImageBox you don't neet KeyPreview ^_^
-
May 6th, 2001, 02:43 PM
#4
Frenzied Member
Right 
Just read Fox's tutorials, they'll tell you all you need to know
Harry.
"From one thing, know ten thousand things."
-
May 6th, 2001, 03:14 PM
#5
PowerPoster
I only made one tutorial and btw I'm still on it...
However, thanks Harry :P
-
May 6th, 2001, 04:41 PM
#6
Frenzied Member
Heh You still have the example programs though right?
Harry.
"From one thing, know ten thousand things."
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
|