다음을 통해 공유


Mouse.WheelScrollLines 속성

정의

마우스 휠을 한 단계 회전할 때 스크롤할 양을 나타내는 숫자를 가져옵니다.

public:
 property int WheelScrollLines { int get(); };
public int WheelScrollLines { get; }
member this.WheelScrollLines : int
Public ReadOnly Property WheelScrollLines As Integer

속성 값

Integer 마우스 휠을 한 단계 회전할 때 스크롤할 양을 나타내는 값입니다. 양수 값은 해당 줄 수만큼 스크롤하는 것을 나타내고 음수 값은 한 번에 한 화면씩 스크롤을 나타냅니다.

예외

마우스에 스크롤 휠이 없습니다.

예제

다음은 마우스에 스크롤 휠이 있는지 확인하고 이 속성을 사용하여 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.WheelScrollLines 속성과 유사한 MouseWheelScrollLines 기능을 제공합니다.

이 속성은 마우스에 스크롤 휠이 없는 경우 예외를 throw하므로 속성을 확인하여 My.Computer.Mouse.WheelExists 마우스에 스크롤 휠이 있는지 확인해야 합니다.

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

프로젝트 유형별 가용성

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

적용 대상

추가 정보