I am trying to send a key stroke to one application through PostMessage. I use too much Spy ++ to try to figure out how to send a message, since I do not fully understand its inner workings.

In this picture, the first element (selected element) was made with the actual keystroke made by me. One with a red ellipse around it (bottom) was made with the following code:
WinApi.PostMessage(InsideLobbyHandle, WinApi.WM_KEYDOWN, (int)WinApi.VK_UP, 1);
I suppose this should have something to do with the last PostMessage () parameter, but I can't figure out how this works. I can see in the original key stroke ScanCode = 48, and in mine - 0, and fExtended - 1, and in mine - 0. How can I make it look the same?
At http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx I cannot figure out how the last parameter works.
source
share