SendMessage(Button1.Handle, WM_LBUTTONDOWN,0, 0);不管用,我用它发送鼠标左健事件,看着Button1动了一下,焦

  • 主题发起人 主题发起人 路远
  • 开始时间 开始时间

路远

Unregistered / Unconfirmed
GUEST, unregistred user!
SendMessage(Button1.Handle, WM_LBUTTONDOWN,0, 0);不管用,我用它发送鼠标左健事件,看着Button1动了一下,焦点也移动到Button1上就是不执行Button1的Click事件(21分)<br />如题
 
再发送一个ButtomUP试试呀。
 
SendMessage(Button1.Handle, WM_LBUTTONDOWN,0, 0);<br>SendMessage(Button1.Handle, WM_LBUTTONUP,0, 0);
 
SendMessage(Button1.Handle, BM_CLICK, 0, 0);<br>
 
Agree 独帅
 
多谢几位,我用SendMessage(Button1.Handle, WM_LBUTTONDOWN,0, 0);<br>SendMessage(Button1.Handle, WM_LBUTTONUP,0, 0);或都是<br>SendMessage(Button1.Handle, BM_CLICK, 0, 0);按两下才成功。我加了双份SendMessage(Button1.Handle, BM_CLICK, 0, 0);<br>。多谢多谢。
 
多人接受答案了。
 
后退
顶部