如何模拟Mouse右点击桌面上的一个图标?(50分)

  • 主题发起人 主题发起人 dzb
  • 开始时间 开始时间
D

dzb

Unregistered / Unconfirmed
GUEST, unregistred user!
我试过 如下方法不行.<br><br>&nbsp; &nbsp; SetCursorPos(X,Y);<br>&nbsp; &nbsp; mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);<br>&nbsp; &nbsp; mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
 
<br>&nbsp; &nbsp; SetCursorPos(X,Y);<br>&nbsp; &nbsp; mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);<br>&nbsp; &nbsp; application.processmessage;<br>&nbsp; &nbsp; mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
 
dzb: 我试过,你的可以:)<br>honestman: Application.ProcessMessages在这有啥用?
 
learning...
 
Reboot:<br>嘿嘿,honestman用 Application.ProcessMessages是想让程序休息一下 ^_^<br>因为右键按下有可能来不及响应抬起,这样就好啦
 
接受答案了.
 
后退
顶部