I have a form that overrides the OnKeyPress() / OnKeyUp() / OnKeyDown() methods.
When I do a P/Invoke call to keybd_event() it does not make it into these methods. Here is my P/Invoke:
public const int KEYEVENTF_KEYUP = 2;
public const int VK_RETURN = 0x0D;
public void pressEnterKey()
{
//press the enter key
keybd_event(VK_RETURN, 0, 0, 0);
//releasethe enter key
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0);
}
Is this a threading issue
Thanks,
-Alan-

keybd_event not firing OnKeyPress callback method
TruePsion
What platform are you seeing this issue on
Try to see if you get the same issue with another Key e.g. Shift Key, or the arrow Keys.
Thanks.
GOsborn
You may find the following articles helpful:
http://msdn2.microsoft.com/en-us/library/ms838019.aspx
http://www.danielmoth.com/Blog/2004/10/invoke-cf-and-full-fx.html
also see the following newsgroup post.
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/3b98d4efb018ad86
Cheers.
Soumya B
Any ideas
Thanks,
-Alan-