views:

24

answers:

1

hi

how to send any key from my program to another - in windows-mobile ?

for ex: if i press 'A' in my program, and i want to send it to another program

thank's in advance

A: 

We need to know a bit more about your goals. Are you trying to create some form of "keyboard" application? The "proper" way to do this is to create a SIP (Boling has a good tutorial in his book), which is designed for doing that. Of course that can't be done in managed code.

PostKeybdMessage or keybd_event are API ways to inject characters into the keyboard stream and can be P/Invoked.

If you are needing to target a *specific" application, then PostMessage is probably how you're going to have to go about it. If you are trying to target a specific control in a specific app, it gets more challenging because you need that target HWND.

ctacke