Declares:
Code:
Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (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 ' left button down
Public Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Syntax:
Code:
'Move mouse
Cursor.Position = New Point(0, 0)
'Left Click
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
'Left Up
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Anyway this is in VB.net not VB6 so it might be diff...
Oh and the reason I didn't enter the cordinates parameter into mouse_event is beacuse for me its bugged up. IDK why...