|
-
Oct 14th, 2006, 05:48 AM
#1
Thread Starter
Fanatic Member
SendMessage better than SendKeys, or VK_ ?
It's been suggested by other moderators, and guru's that SendMessage is prefered over SendKeys and Virtual Keys via the keyboard_event API.
While testing this form, I've found that this is not entirely true:
VB Code:
SendMessage(lhWndStartButton, WM_KEYDOWN, VK_SPACE, 0)
SendMessage(lhWndStartButton, WM_KEYUP, VK_SPACE, 0)
Am I using this wrong?
If a user is typing something into an edit box(fairly fast), then this sendmessage fails.
It would seem for no reason, since keyboard focus is never officially transfered to the app's start button.
I thought the handle would prevent this.
When sendkeys fails, we know why, because of the undetermined keyboard focus.
I really need to press this button without failure!
Can any top level guru's help me here?
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
|