要做模擬滑鼠點擊的話,當然要先抓座標囉
以下為form1的code
Option Explicit
Private Sub Timer1_Timer()
Dim CurL As PointAPI
Dim myval
myval = GetCursorPos(CurL)
Label1.Caption = CurL.Xp '滑鼠X的座標
Label2.Caption = CurL.Yp '滑鼠Y的座標
End Sub
以下為module1的code
Option Explicit
Declare Function GetCursorPos Lib "user32" (lpPoint As PointAPI) As Long
Type PointAPI
Xp As Long
Yp As Long
End Type