System.Windows.Forms.TrackBar.SetRange Method

Sets the minimum and maximum values for a System.Windows.Forms.TrackBar.

Syntax

public void SetRange (int minValue, int maxValue)

Parameters

minValue
The lower limit of the range of the track bar.
maxValue
The upper limit of the range of the track bar.

Remarks

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

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0