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.Mouse
Public ReadOnly Property Mouse As Mouse
屬性值
電腦的 My.Computer.Mouse 目標。
範例
這個範例利用 和 My.Computer.Mouse.WheelExistsMy.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 物件。
此特性僅適用於非伺服器應用程式。
依專案類型提供可用性
| 專案類型 | Available |
|---|---|
| Windows 表單應用程式 | Yes |
| 類別庫 | Yes |
| 主控台應用程式 | Yes |
| Windows 表單控制函式庫 | Yes |
| Web 控制庫 | No |
| Windows 服務 | Yes |
| 網站 | No |