Partager via


TrackBar Control Overview (Windows Forms)

The Windows Forms TrackBar control (also sometimes called a "slider" control) is used for navigating through a large amount of information or for visually adjusting a numeric setting. The TrackBar control has two parts: the thumb, also known as a slider, and the tick marks. The thumb is the part that can be adjusted. Its position corresponds to the Value property. The tick marks are visual indicators that are spaced at regular intervals. The trackbar moves in increments that you specify and can be aligned horizontally or vertically. For example, you might use the track bar to control the cursor blink rate or mouse speed for a system.

Key Properties

The key properties of the TrackBar control are Value, TickFrequency, Minimum, and Maximum. TickFrequency is the spacing of the ticks. Minimum and Maximum are the smallest and largest values that can be represented on the track bar.

Two other important properties are SmallChange and LargeChange. The value of the SmallChange property is the number of positions the thumb moves in response to having the LEFT or RIGHT ARROW key pressed. The value of the LargeChange property is the number of positions the thumb moves in response to having the PAGE UP or PAGE DOWN key pressed, or in response to mouse clicks on the track bar on either side of the thumb.

See Also

Reference

TrackBar

Other Resources

TrackBar Control (Windows Forms)