Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


is mouse present and how many buttons

 

 'is mouse present and how many buttons

Private Declare Function GetSystemMetrics Lib "User32" (ByVal index As Long) As Long
Private Const SM_CMOUSEBUTTONS = 43
Private Const SM_MOUSEPRESENT = 19
Dim X As Long, Y As Long
Dim S As String


Private Sub Command1_Click()
X = GetSystemMetrics(SM_MOUSEPRESENT)
If X = 1 Then
Y = GetSystemMetrics(SM_CMOUSEBUTTONS)
S = "Mouse present " & vbCrLf
S = S & "and it has " & CStr(Y) & " buttons"
MsgBox S, vbExclamation, "Mouse"
Else
MsgBox "Attention! Mouse is not present", vbCritical, "Mouse"
End If
End Sub

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
See What URL is being displayed(VB)
control pad example(GameBoy)
total no of colors(VB)
Random passwords(PHP)
basic web control example(VB)
Getting the length of a string(PHP)
Email function(ASP)
box gradient(VB)

    




Copyright © 2003 by programmershelp.co.uk