Hi everybody. I'm developing an application that sends keystrokes to another background application. The problem is that i have so send a "Alt+F", but i can't get it to work.
I'm using PostMessage:
[DllImport("User32.Dll", EntryPoint = "PostMessageA")]
private static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam, int lParam);
const int VK_ALT = 0x12;
const int WM_KEYDOWN = 0x100;
PostMessage(hWnd, WM_KEYDOWN, VK_ALT, 0);
PostMessage(hWnd, WM_KEYDOWN, VK_F, 0);
The result is that the background application "see" the "F", but no the "Alt".
Anybody has any idea how to fix it or how to do this without using SendKeys? Because the background application used to be minimized.
Greetings and thanks in advance. :)