仿真鼠标消息(100分)

  • 主题发起人 主题发起人 microwind
  • 开始时间 开始时间
M

microwind

Unregistered / Unconfirmed
GUEST, unregistred user!
想仿真鼠标的双击动作,请问高手们有何主意?
 
easy!that is form.dblclick!<br>&nbsp; SendMessage(Form1.Handle,WM_LBUTTONDBLCLK,0,0);<br>
 
no,no,不是消息,是动作
 
NEWS里抄一段给你,仿真EDIT1的鼠标双击<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br>&nbsp; pt: TPoint;<br>begin<br>&nbsp; pt:= edit1.ClientToScreen( Point( 4,4 ));<br>&nbsp; SetCursorPos( pt.x, pt.y );<br>&nbsp; mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );<br>&nbsp; mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );<br>&nbsp; mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );<br>&nbsp; mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );<br>end;
 
多谢,我在试验中
 
接受答案了.
 
后退
顶部