Post #520Code:'//In Module Declare Function SetCursorPos Lib "user32.dll" _ (ByVal X As Long, ByVal Y As Long) As Long Declare Sub mouse_event Lib "user32.dll" _ (ByVal dwFlags As Long, ByVal dx As Long, _ ByVal dy As Long, ByVal cButtons As Long, _ ByVal dwExtraInfo As Long) Public Const MOUSEEVENTF_LEFTDOWN = &H2 Public Const MOUSEEVENTF_LEFTUP = &H4 Public Const MOUSEEVENTF_ABSOLUTE = &H8000 Public Const MOUSEEVENTF_MOVE = &H1 '//Form Private Sub Command1_Click() mouse_event MOUSEEVENTF_MOVE And MOUSEEVENTF_ABSOLUTE, 0, 0, 0, 0 SetCursorPos 402.5, 340 mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 End Sub




Reply With Quote