|
-
February 4th, 2000, 01:02 AM
#1
Detect shift+left mouse click
how would I detect if any shift button and the left mouse button has been clicked anywhere on the desktop?
-
February 4th, 2000, 01:34 AM
#2
Re: Detect shift+left mouse click
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
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
|