|
-
Aug 30th, 2005, 03:15 AM
#1
Thread Starter
Frenzied Member
Classic VB/API-How to sense mouse button is down or up
It will tell you whether the mouse button is UP or DOWN whether mouse is in or out of ur vb project.
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_LBUTTON = &H1
Private Sub Timer1_Timer()
Dim tX As Long
tX = GetAsyncKeyState(VK_LBUTTON)
If tX And 32768 Then
Label1.Caption = "Button is down"
Else
Label1.Caption = "Button is up"
End If
End Sub
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
|