Option ExplicitContoh penggunaan:
Private Const SM_CMOUSEBUTTONS = 43
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Function IsMousePresent() As Boolean
IsMousePresent = (GetSystemMetrics(SM_CMOUSEBUTTONS) > 0)
End Function
Private Sub Command1_Click()
MsgBox IsMousePresent
End Sub