ערוך

שתף באמצעות


Computer.Mouse Property

Definition

Gets an object that provides properties for getting information about the format and configuration of the mouse installed on the local computer.

public:
 property Microsoft::VisualBasic::Devices::Mouse ^ Mouse { Microsoft::VisualBasic::Devices::Mouse ^ get(); };
public Microsoft.VisualBasic.Devices.Mouse Mouse { get; }
member this.Mouse : Microsoft.VisualBasic.Devices.Mouse
Public ReadOnly Property Mouse As Mouse

Property Value

The My.Computer.Mouse object for the computer.

Examples

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

Remarks

This property provides easy access to the My.Computer.Mouse object. For more information, see Mouse object.

This property is available only for non-server applications.

Availability by Project Type

Project type Available
Windows Forms Application Yes
Class Library Yes
Console Application Yes
Windows Forms Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

Applies to

See also