-
Feb 13th, 2010, 09:41 PM
#1
Thread Starter
Junior Member
How to detect a keypress in vb2010
I would like the program to detect a key press and then report that key to a MsgBox
I have the code for the message box thats easy, and I have
Any help is welcome
-
Feb 13th, 2010, 09:47 PM
#2
Re: How to detect a keypress in vb2010
Handle the KeyPress of the appropriate control. If it's the form, make sure you set the KeyPreview property to True, so it raises keyboard events no matter what control has focus.
-
Feb 13th, 2010, 09:53 PM
#3
Thread Starter
Junior Member
Re: How to detect a keypress in vb2010
Thank you for the tid bit, I didn't change that proerty, but I want it to be able to tell what key is pressed, such as
-
Feb 13th, 2010, 10:10 PM
#4
Thread Starter
Junior Member
Re: How to detect a keypress in vb2010
Found the code, I am using Asc(e.keychar())
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|