Detect key input

Reply

Join Date: Sep 2006
Posts: 15
Reputation: nugget93 is an unknown quantity at this point 
Solved Threads: 0
nugget93 nugget93 is offline Offline
Newbie Poster

Detect key input

 
0
  #1
May 2nd, 2009
Im trying to make a small game in visual basic 6. It requires the moving of a command button depending on the different key inputs. I have the code working when you push other command buttons that this one moves but I cant figure out how to detect when either the wasd keys are pushed or the arrow keys. If someone could give me a code snippet for detecting key input thatd be awesome.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 807
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 146
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: Detect key input

 
0
  #2
May 2nd, 2009
use the keydown,keypress, or keyup event of the command button and form (just in case the command button looses focus).

Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC