i believe that SendMessage() is useful when you're not certain that the
application is visible but you want to send it a click anyway. It is
possible however for the receving application to determine that this
was in fact a "fake" keyboard event and consequently ignore it. is that
true.. i know that it is true for mouse events, which is why you'd
prefer to use mouse_event()... is the same also true for keyboard
events?
Michael Cierkowski wrote:
You would use SendMessage also:
The follow will send a 'M' to the targetWindow
SendMessage(targetWindowHandle, WM_KEYDOWN, VK_M, 0)
Michael Cierkowski
<we********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com... does anyone know how to generate keyboard events in another
application?
like
[DllImport ("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int
wParam, int lParam);
can be used for mouse events...
how would you do keyboard events?
assuming that the other appliation is not a dotNet application