I want to send mouse clicks to an application like I do SendKey, I already designed a method to get the mouse to the properlocation on the destination, I just don't know how to send the click to it.
Printable View
I want to send mouse clicks to an application like I do SendKey, I already designed a method to get the mouse to the properlocation on the destination, I just don't know how to send the click to it.
Use the Mouse_Event API, ie.
------------------Code: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 Command1_Click()
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Excuse me if I'm stupid. I'm pretty new at this and all. What part of that codes is a Module and what part goes into the "form" section of my program?
Everything goes in to the form.
All Lines starting with the word PRIVATE if you change it to the word PUBLIC can be put in the MODULE.