|
-
Aug 10th, 2005, 05:17 PM
#3
Thread Starter
Lively Member
Re: Form_KeyPress having CommandButton with focus
Well, that sounds good. But I don't know if that will work. I'll explain why: It's not a keyboard what I'm using, but a scanner. That scanner simulates the keyboard input and sends a pair 13-10 (vbCrLf) afterwards.
For example, let's imagine I read a barcode with my scanner. I'll get one Form_KeyPress event for each number in my barcode. After all these numbers in the bar code, the scanner sends a vbCrLf, which is handled as if the user had pressed the Enter key: the focused CommandButton fires a Click event, and the Form_KeyPress doesn't trigger.
I'll try the GetAsyncKeyState approach, and tell you what happened.
Thanks for your input!
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
|