Advertisement

Move heroes

Started by February 11, 2002 07:45 AM
0 comments, last by Alexiev 22 years, 7 months ago
I don''t know how can I make my heros move light in VB. I just want to know how can I understand if key is press. Not to write from Keyboard buffer and wait 1/4 sec after first read from buffer.
use the KeyDown and KeyUp events... whenever a key is pressed, the KeyDown event is called with the "KeyCode" number of the key. KeyUp is called when you release the key.
you will have to keep track of what keys are held down (as you only get one event when you push the key, not many repeatedly like the KeyPress event)... you can do this with an array of boolean values (for if a key is held down or not).
HTH.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement