Jump to content
  • Advertisement
Sign in to follow this  
bkw4ever

lol

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

ok so basically the problem is this: im an idiot i am currently programming in vb 6( i know lol i know) and will possibly be stuck with it for awhile.... i dont get why this doesnt work: private sub Form_KeyUp(KeyCode as integer, Shift as integer) if KeyCode = 50 then 'do this end if end sub its pseudo obviously but i just dont get why i cant get any form key event to work.. whether i work with ascii or keycode it just doesnt work.... Help please!!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
ok so basically the problem is this: im an idiot


lol

I dont know BASIC at all, but have you checked to make sure that Form_Keyup is even being called in the first place? Try putting a message box or debug break in there and make sure its hitting the function. If that doesent work then you need to get that working first. Then I would look at what the keycode is currently set to. Like I said, I know nothing about BASIC, but there are many ways a keycode can be represented.

Hope this helps

Share this post


Link to post
Share on other sites
yea thanks... i tried to set a label.caption to the keycode because i believe that when a key is pressed a keycode is sent to the user(if that makes sense).. but it doesnt display... ill try to set it to 0 but i cant imagine that working... the worst part is ive done this before but it just wont work

i wish i could just say ...

VisualBasic.isKeyPressed("space");
lol

Share this post


Link to post
Share on other sites
well VB6 does have GetASyncKeyState which does the thing you're thinking of..

Just wondering though why are you still using VB6 when the new versions of VB.NET have express editions for free?

Share this post


Link to post
Share on other sites
Quote:
Original post by bkw4ever
ok so basically the problem is this: im an idiot


I saw this line and immediately thought, 'this' inherits from the 'im an idiot' class.

Share this post


Link to post
Share on other sites
well i dont have internet on my pc so i need someway to get an installer onto a flash but cant figure it out.. so im stuck with 6.0

Share this post


Link to post
Share on other sites
I remember when I programmed with VB6 ions ago there was something like Debug.print.
So try printing the keyCode value, this might help.

Share this post


Link to post
Share on other sites
Put your cursor on the line "If KeyCode = 50 Then". Press [F9] on your keyboard. This will set a breakpoint. Run your program. Press a key. The program will break. Focus on the "Immediate Window" in the VB6 development environment. Type "print KeyCode". See what it says. Now you've learned how to use breakpoints and the immediate window. I don't recall how to get to the Watch and Locals windows, but those would be preferable over typing "print KeyCode". See if you can find them on your own.

Share this post


Link to post
Share on other sites
.......... i donwloaded that yesterday for four hours but when it didnt do anything i deleted it..........

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!