How do I find you which mousebuttons currently being pressed no matter where the mouse-pointer is nor what program or window that has focus?
AND
Is there some way of block these clicks, so I could disable right-click?
Printable View
How do I find you which mousebuttons currently being pressed no matter where the mouse-pointer is nor what program or window that has focus?
AND
Is there some way of block these clicks, so I could disable right-click?
Timer interval must be very low (e.g. 1 ms)Code:Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_LBUTTON = &H1
Private Const VK_RBUTTON = &H2
Private Sub Timer1_Timer()
If GetAsyncKeyState(VK_LBUTTON) <> 0 Then MsgBox "Left Mouse Button"
If GetAsyncKeyState(VK_RBUTTON) <> 0 Then MsgBox "Right Mouse Button"
End Sub
Okay, thanks, it works just fine :)
1 down, 1 to go, so if anyone knows how to intercept
the call that spawns the "right-click" menu and kill it,
please don't hesitate to write me, your help will be
greatly appreciated.