Use the Mouse_Event API, eg.
------------------Code:Private Type POINTAPI x As Long y As Long End Type Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Const MOUSEEVENTF_LEFTDOWN = &H2 Private Const MOUSEEVENTF_LEFTUP = &H4 Private Sub DoMouseClick() Dim tCP As POINTAPI Call GetCursorPos(tCP) Call mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, tCP.x, tCP.y, 0&, 0) End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]




Reply With Quote