I'm trying to do a Remote Administration Tool I can move the mouse on the remote PC with SetMousePos API call, i need to do a click! how can i do that??
Printable View
I'm trying to do a Remote Administration Tool I can move the mouse on the remote PC with SetMousePos API call, i need to do a click! how can i do that??
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]
Aaron thanx for your help your code looks easy, now is time to use it!! thanx a lot, this Remote Administration Tool will be improved with your help, thanx again.
Regards
Ismael