IncrementStep は、Value プロパティに特定の量を追加するのと同等です。ただし、Value プロパティは、Minimum および Maximum 値内の値に設定する必要があります。そうでなければ例外が生成されます。IncrementValue メソッドは、それが Value を調整する時に Minimum および Maximum 値を考慮に入れます。したがって、使用がより便利になります。
Imports Infragistics.Win Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click ' Call the 'PerformStep' method which will ' increment the 'Value' property by the ' value of the 'Step' property. Me.ultraProgressBar1.PerformStep() ' Alternatively you can increment the value ' by any amount by calling the 'IncrementValue' ' method. Me.ultraProgressBar1.IncrementValue(7) ' Note: The advantage these methods offer over ' just adding the amount to the 'Value' property ' is that they will keep the value in range ' (between the 'Minimum' and 'Maximum' values) ' without throwing an exception. If you try ' to set the 'Value' property out of range an ' exception will be thrown. End Sub
using Infragistics.Win; private void button1_Click(object sender, System.EventArgs e) { // Call the 'PerformStep' method which will // increment the 'Value' property by the // value of the 'Step' property. this.ultraProgressBar1.PerformStep(); // Alternatively you can increment the value // by any amount by calling the 'IncrementValue' // method. this.ultraProgressBar1.IncrementValue( 7 ); // Note: The advantage these methods offer over // just adding the amount to the 'Value' property // is that they will keep the value in range // (between the 'Minimum' and 'Maximum' values) // without throwing an exception. If you try // to set the 'Value' property out of range an // exception will be thrown. }