Y ysp_1984 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #1 如何在程序中模拟按纽的单击事件? 在程序中模拟键盘和鼠标的资料那里有啊?
Z zywcd Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #2 你需要这样的吗? procedure TForm1.Button2Click(Sender: TObject); begin Button1.Click;//运行按钮1鼠标单击的过程, end;
N nicai_wgl Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #3 PostMessage(Application.Handle,WM_LBUTTONDOWN,0,0); 这个是模拟鼠标在0,0坐标的左键单击事件,大部分鼠标和键盘都可以通过消息来模拟。
T tang_xue_feng Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #4 PostMessage(Button2.Handle,WM_LBUTTONDOWN,0,0); 这个是模拟鼠标在Button2单击事件,大部分鼠标和键盘都可以通过消息来模拟。
Q qi_jianzhou Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #5 keybd_event 键盘 mouse_event 鼠标事件
K kmask Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-06 #6 mouse_event(mouseeventf_leftdown,0,0,0,GetMessageExtraInfo()); mouse_event(mouseeventf_leftup,0,0,0,GetMessageExtraInfo());
mouse_event(mouseeventf_leftdown,0,0,0,GetMessageExtraInfo()); mouse_event(mouseeventf_leftup,0,0,0,GetMessageExtraInfo());