Click to See Complete Forum and Search --> : Mouse
TB
May 26th, 2001, 04:41 AM
Hello!
How can I determine If a mouse button is pressed OUTSIDE the form?
Thank you for any help.
Vlatko
May 26th, 2001, 05:56 AM
You will need to install a global hook that monitors the mouse (the hook procedure has to be installed in a standard dll).
Megatron
May 26th, 2001, 10:47 AM
Use the GetAsyncKeyState API. It's not as accurate, but it's less complicated.
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
TB
May 26th, 2001, 11:01 AM
Thank you for your help.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.