System.Windows.Forms.ToolStripProgressBar.Increment Method

Advances the current position of the progress bar by the specified amount.

Syntax

public void Increment (int value)

Parameters

value
The amount by which to increment the progress bar's current position.

Remarks

The ToolStripProgressBar.Increment(int) method enables you to increment the value of the progress bar by a specific amount. This method of incrementing the progress bar is similar to using the ToolStripProgressBar.Step property with the ToolStripProgressBar.PerformStep method. The ToolStripProgressBar.Value property specifies the current position of the System.Windows.Forms.ToolStripProgressBar. If, after calling the ToolStripProgressBar.Increment(int) method, the ToolStripProgressBar.Value property is greater than the value of the ToolStripProgressBar.Maximum property, the ToolStripProgressBar.Value property remains at the value of the ToolStripProgressBar.Maximum property. If, after calling the ToolStripProgressBar.Increment(int) method with a negative value specified in the value parameter, the ToolStripProgressBar.Value property is less than the value of the ToolStripProgressBar.Minimum property, the ToolStripProgressBar.Value property remains at the value of the ToolStripProgressBar.Minimum property.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0