VB怎么模仿鼠标左键单击

来源:百度知道 编辑:UC知道 时间:2024/05/18 01:33:54
VB怎么在20秒后模仿鼠标左键单击
代码能不能说下

新建一个默认exe工程,关闭后把下文保存为Form1.frm替换你的文件,然后重开工程.
因为不知道你用在哪儿,所以没法测试.马马虎虎应该没什么错啦.
------------
22:09补充:设计的是用两个按钮启动两个功能.
第一个问题你可以删除
Private Sub Command2_Click() 以及以下的几行(不跳行)
同样的程序代码,删除Private Sub Command1_Click() 以及以下的几行(不跳行)
就是完成第二个功能的代码.

---------------------------------------------------------
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.Timer Timer2
Left = 3960
Top = 2640
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 495
Left = 3240
TabIndex = 1
Top = 1440
Width = 1095
End
Begin VB.Timer Timer1
Interval = 50
Left = 3960
Top = 2040
End
Begin VB.CommandButton Command1
Captio