|
-
Jul 6th, 2000, 08:05 PM
#1
Thread Starter
Junior Member
I want to make a click with the mouse but i don't find the right API. How can i do ?
-
Jul 6th, 2000, 08:07 PM
#2
Do you want to simulate the click on a spot on your form?
Or ona general spot on the screen?
-
Jul 6th, 2000, 08:20 PM
#3
Thread Starter
Junior Member
I want to simulate a click anywhere on the screen.
-
Jul 6th, 2000, 08:27 PM
#4
SendMessage
I'm 99% sure the SendMessage API will do it for you:
Code:
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
For further info about the use of the API post a message at the API board.
That's about the best I can do.
Hope this helps!
-
Jul 6th, 2000, 08:32 PM
#5
Thread Starter
Junior Member
Thank you for your help !
-
Jul 6th, 2000, 08:37 PM
#6
Fanatic Member
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
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Produce Left Click
Chemically Formulated As:
Dr. Nitro
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
|