Progress Bar Control in VB.NET
ProgressBar Control is used to graphically display the progress of particular task. Thus using ProgressBar control you can display how much task has been completed and how much task is remaining.
Properties of ProgressBar Control
Main Properties of ProgressBar Control is explained below:
|Minimum||It Get or Set Lower Bound of the range within which ProgressBar Control works.|
|Maximum||It Get or Set Upper Bound of the range within which ProgressBar Control works.|
|Value||It Get or Set current value of the ProgressBar within range specified using Minimum and Maximum property.|
|Step||It Get or Set Step value by which the current value of ProgressBar control is Increment.|
|Style||It is used to set the Style of progressBar Control. It can have one of the following value: Blocks,Continuous,Marquee|
|Visible||It is used to set weather ProgressBar control is visible on the form or not. It has boolean value true or false. Default value is true.|
|Enabled||It is used to set weather ProgressBar control is enabled or not. It has boolean value true or false. Default value is true.|
|MarqueeAnimationSpeed||It Get or Set speed of marquee animation when Style property of ProgressBar Control is set to marquee. The speed is in milisecond. Default value is 100 ms.|
Methods of ProgressBar Control
Main Methods of ProgressBar Control is explained below:
|Increment||It is used to increment the current value of ProgressBar Control by specific value.
|PerformStep||It is used to increment the current value of ProgressBar Control by the value specified in the Step property of ProgressBar.
Example of ProgressBar Control in VB.NET
Design a form as shown below:
Now set Properties of various controls as shown below:
|Form||Text||ProgressBar Control Demo|
Now Double click on Start button and write following code:
Dim i As Integer
For i = ProgressBar1.Minimum To ProgressBar1.Maximum - 1