Using Scrollbars as Input Devices
Although scroll bars are often tied to EDITTEXTs or WINDOWs, you'll sometimes see them used as input devices. Because these controls can indicate the current position on a scale, scroll bar controls can be used individually to control program input. For example, to control the sound volume or to adjust the colors in a picture. The HSCROLLBAR (horizontal) and VSCROLLBAR (vertical) controls operate independently from other controls and have their own set of events, properties, and methods. Scroll bar controls are not the same as the built-in scroll bars that are attached to EDITTEXTs, DATALISTs, COMBOBOXs, or WINDOWs (EDITTEXTs and WINDOWs have a scrollbars property to add or remove scroll bars that are attached to the control).
Windows interface guidelines suggest using SLIDER controls as input devices instead of scroll bars. Examples of SLIDER controls can be seen in the Windows control panel.
![]() |