how would I detect if any shift button and the left mouse button has been clicked anywhere on the desktop?
Printable View
how would I detect if any shift button and the left mouse button has been clicked anywhere on the desktop?
Here is the code to detect right, left mouse clicks and Shift
private Declare Function GetAsyncKeyState Lib "user32" (byval vKey as Long) as Integer
private Const VK_LBUTTON = &H1
private Const VK_RBUTTON = &H2
private Const VK_SHIFT = &H10
private Sub Form_Load()
Timer1.Interval = 100
End Sub
private Sub Timer1_Timer()
If GetAsyncKeyState(VK_LBUTTON) then Caption = "left"
If GetAsyncKeyState(VK_RBUTTON) then Caption = "right"
If GetAsyncKeyState(VK_SHIFT) then Caption = "shift"
End Sub
Just paste it into clear form