K kaida Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-06 #2 这个问题已经有人提过。我再贴一次代码: 假定要模拟鼠标单击窗体 50,50 处,你可以: SetCursorPos (Form1.Left+50, Form1.Top+50); mouse_event (MOUSEEVENTF_LEFTDOWN, 0,0,0,0); mouse_event (MOUSEEVENTF_LEFTUP, 0,0,0,0);
这个问题已经有人提过。我再贴一次代码: 假定要模拟鼠标单击窗体 50,50 处,你可以: SetCursorPos (Form1.Left+50, Form1.Top+50); mouse_event (MOUSEEVENTF_LEFTDOWN, 0,0,0,0); mouse_event (MOUSEEVENTF_LEFTUP, 0,0,0,0);
A andy263 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-06 #4 SendMessage(hwnd,WM_LBUTTONDOWN,MK_LBUTTON,0) SendMessage(hwnd,WM_LBUTTONUP,MK_LBUTTON,0); 模似鼠标的左键单击