|
Key trapping
Home » Visual Basic » Introduction to Visual Basic
Key trapping
Key trapping
How do you tell what keys your users are pressing? This tutorial teaches you a rock solid method that you can build in games and advanced applications.
Now this is the only tricky bit, (if you have no understanding of computers what-so-ever). When you press the letter "d" on the keyboard, you are not sending "d" to the comptuer, you are sending a number. Every key on your keyboard has it own, unique, number.
So if I wanted to find out what the key of anything is, I made a form that would tell me. Whenever I pressed a key, it would set the .text property of a disabled input field to the keycode value.
|
More Tutorials by this user
|
|
|