Jump to content
  • Advertisement
Sign in to follow this  
Quak

Input with VB

This topic is 4971 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

Hi, I've written a little game during my Visual Basic computing lessons (because it is so boring). I've been using scrollbars for the input so far because I could not figure out how to test if any key is pressed. I'm using for the game loop a timer so I want to test the state of any key out of the timer. Any ideas ? Thx for answers :) (btw. VB really s****, it is a pitty their is no c++ compiler on the system ;) )

Share this post


Link to post
Share on other sites
Advertisement
Visual Basic isn't all that bad. I havn't used vb in awhile but the basic idea is

Make an array of to check if the keys are down.
Dim key(255) as bool

and then on the Keydown function make whatever key was pressed equal to true and then keyup make whatever key was pressed equal to false again. Then in your functions always check for particular keys to see if the action should be preformed.

http://www.vbexplorer.com/VBExplorer/userinput.asp

That's a great tutorial. Should send you on your way.

~Wave

Share this post


Link to post
Share on other sites
Thanks, year VB might be useful in toolprogramming and things like that but I "hate" it :) (as a native c/c++ programmer)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!