• Advertisement

Archived

This topic is now archived and is closed to further replies.

Move heroes

This topic is 5824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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)

Share this post


Link to post
Share on other sites

  • Advertisement