SetRange Method

TrackBar.SetRange Method (Int32, Int32)


Sets the minimum and maximum values for a TrackBar.

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

public void SetRange(
	int minValue,
	int maxValue


Type: System.Int32

The lower limit of the range of the track bar.

Type: System.Int32

The upper limit of the range of the track bar.

You can use this method to set the entire range for the TrackBar at the same time. To set the minimum or maximum values individually, use the Minimum and Maximum properties. If the minValue parameter is greater than the maxValue parameter, maxValue is set equal to minValue.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft