[求助]如何模拟鼠标点击
我想在窗体上放一个command组(多个command按扭也可以,我觉得用command组应该更容易做到)然后在timer事件中触发鼠标自动依次单击每个command (循环)
我写了代码不能实现
请问如何做到 望各位指教
(按index属性单击或者按窗体上的位置单击都行)
Dim i As Integer
Private Sub Command1_Click(Index As Integer)
BackColor = QBColor(Index)
End Sub
Private Sub Command2_Click()
Timer1.Enabled = True
End Sub
Private Sub Command3_Click()
Timer1.Enabled = False
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Load()
Command2.Caption = "开始"
Command3.Caption = "停止"
Command4.Caption = "退出"
Timer1.Enabled = False
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
If i = 7 Then
Call Command1_Click(i)
i = 0
Else
Call Command1_Click(i)
i = i + 1
End If
End Sub
你还要添加什么事件呢?