C# Programming Help

07/09/2007 18:51 beta.services#1
I hope someone out there can answer my question

I am trying to send the F10 key to the conquer window from my application. Using Spy++ it is coming through exactly as when i actually press the F10 key on the conquer window. The only issue is that the message being sent from my application does not produce any response.

Code:
PostMessage(
 * * myProcesses[currentCO].MainWindowHandle, * * * //window handle
 * * 0x105, * * * //the WM_SYSKEYUP message
 * * System.Convert.ToInt32(Keys.F10), * * * //the F10 key
 * * 3225681921 * * *//the additional infromation ScanCode ect...
);
That line produces the same message in Spy++ but i get nothing -.-

Also, while pressing the key on the CO window, Spy++ only detects a WM_SYSKEYUP message. Is this correct? I have tried it both ways. Different additional info for the down key.

Am i sending the message to the wrong handle?

Can anyone give me any clues. pls :D

Thanks.
07/09/2007 19:26 phize#2
what i did was find the window handle of the F(x)-buttons and then do a SendMessage to that handle with WM_LMOUSEDOWN and WM_LMOUSEUP as parametre
07/14/2007 15:19 beta.services#3
thanks, i'll try that now and let you know how it worked out.
07/15/2007 04:12 evanxxxm#4
from what i learn about CO earlier
i believe u cant use a program to send F# series
personally, i tried it with AutoHotKey and AutoIt before
both of them doesnt work, but another way of go around this is:
according to AutoHotKey code, there is a command called "controlclick". it wont move ur mouse at all, but still right/left click where ever u set ur X,Y is.
example:
ControlClick, x110 y750,ahk_id %id%,,RIGHT
this will right click 110,750 (F1) in CO, it works even with minimize or background mode.