newman     VBWeb     VBSource     Portfolio    

IsLButtonDown

FileExists

TOP TEN

IsVBIDE
Returns True if the left mouse is down.
Syntax
If IsLButtonDown() Then ...


Remarks
This function provides a nice alternative to setting a module level variable to True from the MouseDown event and setting it False from MouseUp. Source
#If Win32 Then ' 32-bit VB uses this Declare.
    Declare Function GetKeyStateApi _
        Lib "user32" Alias "GetKeyState" _
        (ByVal nVirtKey As Long) As Integer
#Else   ' 16-bit VB uses this Declare.
    Declare Function GetKeyStateApi _
        Lib "User" Alias "GetKeyState" _
        (ByVal nVirtKey As Integer) As Integer
#End If

Function IsLButtonDown()
    Const KEY_LBUTTON = &H1

    If GetKeyStateApi(KEY_LBUTTON) < 0 Then
        IsLButtonDown = True
    End If
End Function
	


Feedback Comments
Return Address (if you want a reply)


Copyright 1997 NEWMAN Services Corp. All rights reserved.
973-228-5753 pres@newmanservices.com
DECONSTRUCT THIS PAGE