|
-
May 26th, 2001, 04:41 AM
#1
Thread Starter
Lively Member
Mouse
Hello!
How can I determine If a mouse button is pressed OUTSIDE the form?
Thank you for any help.
-
May 26th, 2001, 05:56 AM
#2
Frenzied Member
You will need to install a global hook that monitors the mouse (the hook procedure has to be installed in a standard dll).
-
May 26th, 2001, 10:47 AM
#3
Use the GetAsyncKeyState API. It's not as accurate, but it's less complicated.
Code:
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbLeftButton) Then MsgBox "L Button pressed"
End Sub
-
May 26th, 2001, 11:01 AM
#4
Thread Starter
Lively Member
Mouse
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
|