Mouse Class
.NET Framework 3.0
Provides properties for getting information about the format and configuration of the mouse installed on the local computer.
Namespace: Microsoft.VisualBasic.Devices
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)
For more detailed information, see the Visual Basic topic My.Computer.Mouse Object.
The My.Computer.Mouse object provides a way to find information about the computer's mouse: whether the mouse buttons are swapped, and details about the mouse wheel.
This example uses the My.Computer.Mouse.WheelExists and My.Computer.Mouse.WheelScrollLines properties to determine if the mouse has a scroll wheel and how much to scroll when it rotates.
If My.Computer.Mouse.WheelExists Then Dim lines As Integer = My.Computer.Mouse.WheelScrollLines If lines > 0 Then MsgBox("Application scrolls " & _ lines & " line(s) for each wheel turn.") Else MsgBox("Application scrolls " & _ (-lines) & " page(s) for each wheel turn.") End If Else MsgBox("Mouse has no scroll wheel.") End If
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: