|
-
August 6th, 1999, 11:01 AM
#1
Windows NT mouse click
I need to know how to make the left mouse button click in Windows NT. I've tried mouse_event which works fine for me in Win95. The VB documents say that it was superseded and now you have to use SendInput instead. Anyone know how to do this or another way to send a mouse click in NT?
Thanks
-
August 6th, 1999, 11:25 AM
#2
Re: Windows NT mouse click
I found this on planet-source. It works in NT 4
public 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)
public Const MOUSEEVENTF_LEFTDOWN = &H2
public Const MOUSEEVENTF_LEFTUP = &H4
public Const MOUSEEVENTF_MIDDLEDOWN = &H20
public Const MOUSEEVENTF_MIDDLEUP = &H40
public Const MOUSEEVENTF_RIGHTDOWN = &H8
public Const MOUSEEVENTF_RIGHTUP = &H10
public Const MOUSEEVENTF_MOVE = &H1
public Sub LeftClick()
LeftDown
LeftUp
End Sub
public Sub LeftDown()
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
End Sub
public Sub LeftUp()
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Original author is Arthur Chaparyan
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
|