|
-
Apr 29th, 2000, 12:01 PM
#1
Thread Starter
Member
Mouse_Event
Hello-
I'm trying to get the mouse_event API to work but am having problems. I am trying to move the mouse usin GetCursorPos and then synthesize a mouse click but when I call the mouse_event API sub-procedure nothing happens - no error - no nothing. Does anyone have a working example of this code or can give me an idea of what I am doing wrong? Relevent bits of my code is as follows:
Declarations:
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)
Mousedown:
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
Mouseup:
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Module:
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
Any ideas? Thanks or your help!
[Edited by TheLeeMan on 04-30-2000 at 01:02 AM]
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
|