다음을 통해 공유


Mouse.WheelExists 속성

정의

마우스에 스크롤 휠이 있는지 여부를 나타내는 Boolean을 가져옵니다.

public:
 property bool WheelExists { bool get(); };
public bool WheelExists { get; }
member this.WheelExists : bool
Public ReadOnly Property WheelExists As Boolean

속성 값

부울 값으로, 마우스에 스크롤 휠이 있으면 True이고, 그렇지 않으면 False입니다.

예외

컴퓨터에 설치된 마우스가 없는 경우

예제

이 예제에서는 My.Computer.Mouse.WheelExists 마우스 휠이 회전할 때 마우스에 스크롤 휠이 있으면 및 스크롤 하는 크기를 결정 하는 속성입니다.

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.WheelExists 비슷한 기능을 제공 하는 속성을 MouseWheelPresent 속성입니다.

값을 확인 해야 합니다 My.Computer.Mouse.WheelExists 속성에 액세스 하기 전에 WheelScrollLines 마우스에 스크롤 휠이 없는 경우 예외를 throw 하는 속성입니다.

My.Computer.Mouse.WheelExists 속성은 코드를 실행 하는 컴퓨터에 대 한 정보를 제공 합니다.

프로젝트 형식에 따라 가용성

프로젝트 형식 사용 가능
Windows 애플리케이션
클래스 라이브러리
콘솔 애플리케이션
Windows 컨트롤 라이브러리
웹 컨트롤 라이브러리 No
Windows 서비스
웹 사이트 No

적용 대상

추가 정보