The ProgressBar.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 ProgressBar.Step property with the ProgressBar.PerformStep method. The ProgressBar.Value property specifies the current position of the System.Windows.Forms.ProgressBar. If, after calling the ProgressBar.Increment(int) method, the ProgressBar.Value property is greater than the value of the ProgressBar.Maximum property, the ProgressBar.Value property remains at the value of the ProgressBar.Maximum property. If, after calling the ProgressBar.Increment(int) method with a negative value specified in the value parameter, the ProgressBar.Value property is less than the value of the ProgressBar.Minimum property, the ProgressBar.Value property remains at the value of the ProgressBar.Minimum property.
Because a System.Windows.Forms.ProgressBar object whose style is set to ProgressBarStyle.Marquee displays a continuously scrolling bar instead of its ProgressBar.Value, calling ProgressBar.Increment(int) is unnecessary and will raise an InvalidOperationException.