虚拟鼠标按键,朋友们进来看看! 我想做一个小的程序,运行程序以后,鼠标所在的位置每隔一个时间段(例如:1分钟)就左键自动单击一下。这应该用什么api什么函数实现阿?!还请大哥们帮忙~~~~我的可用分不多了,一共就100多一点,我放血给大家50分!~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 鼠标自动点击的例子,模拟鼠标点击 procedure TForm1.Button1Click(Sender: TObject);varx,y:integer;beginx:= form1.Left+button2.Left+25;y:= top+button2.Top+27;SetCursorPos(x,y);Mouse_Event(MOUSEEVENTF_LEFTDOWN,X,Y,0,0);Mouse_Event(MOUSEEVENTF_LEFTUP,X,Y,0,0);end;procedure TForm1.Button2Click(Sender: TObject);beginshowmessage('fksj');end;*************************************// Set the mouse cursor to position x,y:SetCursorPos(x, y);// Simulate the left mouse button downmouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);// Simulate the right mouse button downmouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); mrtxc(阿春),哇,你真是好人一个呀,我找了那么多兄弟的文章,他们都说得太复杂且不能编译,你的简洁可编译,爽,谢谢! 50分问题!!怎么自定义一个按位运算的数据类型,并且想知道如果读写 如何修改动态生成控件的属性 不好意思,初学DELPHI,简单问题 如何让TImage控件picture全屏显示啊 indy idFtp 问题 数字类型转变 创建Active X控件。。大家给点建议 如何获得系统菜单选择事件:如"还原","最小化"等? 在access中如何创建一个临时表? 一个参数技巧的问题: 关于ODBE ADO主从表问题
鼠标自动点击的例子,模拟鼠标点击
procedure TForm1.Button1Click(Sender: TObject);varx,y:integer;beginx:= form1.Left+button2.Left+25;y:= top+button2.Top+27;SetCursorPos(x,y);Mouse_Event(MOUSEEVENTF_LEFTDOWN,X,Y,0,0);Mouse_Event(MOUSEEVENTF_LEFTUP,X,Y,0,0);end;procedure TForm1.Button2Click(Sender: TObject);beginshowmessage('fksj');end;*************************************// Set the mouse cursor to position x,y:SetCursorPos(x, y);// Simulate the left mouse button downmouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);// Simulate the right mouse button downmouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0);mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);