Computer.Mouse 属性 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个对象,该对象提供用于获取有关本地计算机中安装的鼠标的格式和配置信息的属性。
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.MousePublic ReadOnly Property Mouse As Mouse属性值
计算机的 My.Computer.Mouse 对象。
示例
此示例使用 My.Computer.Mouse.WheelExists 和 My.Computer.Mouse.WheelScrollLines 属性来确定鼠标是否具有滚轮以及旋转时滚动的滚动量。
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
注解
此属性提供对 My.Computer.Mouse 对象的轻松访问。 有关详细信息,请参阅 Mouse 对象。
此属性仅适用于非服务器应用程序。
可用性(按项目类型)
| 项目类型 | 可用 | 
|---|---|
| Windows 窗体应用程序 | 是 | 
| 类库 | 是 | 
| 控制台应用程序 | 是 | 
| Windows 窗体控件库 | 是 | 
| Web 控件库 | 否 | 
| Windows 服务 | 是 | 
| 网站 | 否 |