I need to make Post/SendMessage that will make Alt+Space that will open some tab that i need in windows aplication.I can't use SendKeys SendKeys.Send("% ")
i have to use Post/SendMessage only.
This what i have tried so far
private const uint WM_KEYDOWN = 0x0100;
private const uint WM_KEYUP = 0x0101;
private const uint WM_SYSKEYDOWN = 0x0104;
private const uint WM_SYSKEYUP = 0x0105;
private const int VK_MENU = 0x12;
private const int VK_SPACE = 0x20;
PostMessage(Main, WM_SYSKEYDOWN, VK_MENU, 0);//
PostMessage(Main, WM_KEYDOWN, VK_SPACE, 0);
Thread.Sleep(1000);
PostMessage(Main, WM_KEYUP, VK_SPACE, 0);
PostMessage(Main, WM_SYSKEYUP, VK_MENU, 0);
Now i can see that Alt is pressed because tabs get under-lined(first letter)(it's happened in 99% winapp's),but the combination of Alt+Space not happened,and i don't know why.
Any one know what i am doing wrong?