Visual Basic: Windows Controls

Visual Studio 6.0

Slider Control

See Also    Example    Properties    Methods    Events

A Slider control is a window containing a slider and optional tick marks. You can move the slider by dragging it, clicking the mouse to either side of the slider, or using the keyboard.




Slider controls are useful when you want to select a discrete value or a set of consecutive values in a range. For example, you could use a Slider to set the size of a displayed image by moving the slider to a given tick mark rather than by typing a number. To select a range of values, set the SelectRange property to True, and program the control to select a range when the SHIFT key is down.

The Slider control can be oriented either horizontally or vertically.

Distribution Note   To use the Slider control in your application, you must add the MSCOMCTL.OCX file to the project. When distributing your application, install the MSCOMCTL.OCX file in the user's Microsoft Windows System or System32 directory. For more information on how to add an ActiveX control to a project, see the Programmer's Guide.