Log in

View Full Version : Visual Basic Act On Key Pressed?



Demonicman
05-14-2008, 01:04 AM
In visual basic 2005, ive been looking for a way to have an action apon a key being pressed (like for games). What is an example of this code? Ive been looking EVERYWHERE!

Basically,

If up key is pressed then
msgbox ("Up key pressed")
endif

something like that

the form name is Form1 in case thats needed

Nile
05-14-2008, 01:12 AM
Does this help you?:
http://www.vbforums.com/archive/index.php/t-408907.html

Demonicman
05-14-2008, 02:10 AM
yep thanks =D your my hero =P

Nile
05-14-2008, 02:26 AM
Anytime. :)