Re: Sending keystrokes to the another application

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You don't get to pick who gets the characters, in most cases; the user does
that. You can use PostKeybdMessage() and/or keybd_event() to send key data.
Usually you want to just send it to whatever the currently focused window
is, not to a specific window (that's inconsistent with how the user
interface works), and that's very easy with either function.

Paul T.

"me" <me@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C21DDC88-D0F0-4201-83B4-F782BD87D580@xxxxxxxxxxxxxxxx
> Hi!
>
> I need to create custom keyboard for Windows CE. I'm using SendInput
> method
> for sending chars. When I press my button the keyboard application is
> focused. How can I set application that should receive chars focused? The
> application that receives data could be Word, Excel, Internet Explorer
> ect.
> Is there any sample code about this?


.


Quantcast