|
-
Jan 27th, 2000, 05:57 AM
#1
Thread Starter
Member
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.
-
Jan 27th, 2000, 08:22 AM
#2
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]
-
Jan 27th, 2000, 12:44 PM
#3
Thread Starter
Member
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?
-
Jan 28th, 2000, 02:07 AM
#4
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|