Y
youdu
Unregistered / Unconfirmed
GUEST, unregistred user!
我已经看过刘麻子的贴了,<br>http://www.delphibbs.com/delphibbs/dispq.asp?lid=2753402<br><br>但是我向“我的电脑”(explorer.exe)发送VK_LEFT键(后退)却不成功,要是发送ORD('A')却可以!以下是我用的两段代码~<br>1。-----------------------------<br>var<br> hCabinetWClass : THandle;<br>begin<br>hCabinetWClass := FindWindow('CabinetWClass', nil);<br> PostMessage(hCabinetWClass, WM_KEYDOWN, VK_MENU , $002A0001);<br> PostMessage(hCabinetWClass, WM_KEYDOWN, VK_LEFT, $001E0001);<br> PostMessage(hCabinetWClass, WM_KEYUP, VK_LEFT, $C01E0001 );<br> PostMessage(hCabinetWClass, WM_KEYUP, VK_MENU, $C02A0001 );<br>2。---------------------------------------<br>var<br> hCabinetWClass : THandle;<br>begin<br>hCabinetWClass := FindWindow('CabinetWClass', nil);<br> PostMessage(hCabinetWClass, WM_SYSKEYDOWN, VK_LEFT,$201E0001);<br> PostMessage(hCabinetWClass, WM_SYSKEYUP, VK_LEFT, $C01E0001);<br><br>另外lParam参数要怎么写?VK_LEFT,VK_RIGHT的lParam是什么?<br>望指教,谢谢~