|
-
Dec 29th, 1999, 03:58 AM
#1
Thread Starter
New Member
I remember seeing some code on vb-world.net a while back on how to make the system right click or left click and also how to make them double click. I searched and i can't find it anymore on the web at all. Can someone link me to somewhere or can someone just make a bas file and send me a copy of it to my email address? i really need this for some program i am working on. Thanks, i need this asap...
im trying to make a program that will move the mouse around to certain areas of the screen and then click or double click on that spot. So i need the code for the system to right/left to click/double click
thats what i need...can you help?
<[email protected]>
-
Dec 29th, 1999, 04:16 AM
#2
New Member
Bunty, you will need to use API for that. There is too much code for me to list. I will send you soure code for it.
-
Dec 29th, 1999, 10:53 AM
#3
Try this:
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 Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Type POINTAPI
X As Long
Y As Long
End Type
Public Sub ClickMouse(X As Long, Y As Long)
SetCursorPos X, Y
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Passing your coordinates will click the left button on the mouse.
Example: ClickMouse 500, 500
------------------
Serge
Software Developer
[email protected]
ICQ#: 51055819
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
|