SystemInformation.MouseWheelScrollLines Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the number of lines to scroll when the mouse wheel is rotated.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

static member MouseWheelScrollLines : int with get

Property Value

Type: System.Int32

The number of lines to scroll on a mouse wheel rotation, or -1 if the "One screen at a time" mouse option is selected.

The MouseWheelScrollLines property indicates how many lines to scroll, by default, in a multi-line control that has a scroll bar. The corresponding Platform SDK system-wide parameters are SPI_GETWHEELSCROLLLINES and SPI_SETWHEELSCROLLLINES. For more information about system-wide parameters, see "SystemParametersInfo" in the Platform SDK documentation at http://msdn.microsoft.com.

System_CAPS_noteNote

Be sure to handle the special case that occurs if the "One screen at a time" mouse option is selected. In this case, the MouseWheelScrollLines property has a value of -1.

The following code example lists all properties of the SystemInformation class in a ListBox and displays the current value of the property in a TextBox when a list item selected.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: