ProgressBar Control in VB.NET

The Progressbar class provides progress bar control functionality in the .NET framework. You need progress bars to display the progress of your application or background tasks.
  • 4947
 

The Progressbar class provides progress bar control functionality in the .NET framework. You need progress bars to display the progress of your application or background tasks.

There are only three members of the ProgressBar class you should know about. The Maximum, the Minimum, and the Value proeprties.

You create a progress bar control using ProgressBar constructor.

Me.progressBar1 = New System.WinForms.ProgressBar()

After creating instance of a progress bar you set the range of the progress bar by using Minimum and Maximum properties of the ProgressBar.

progressBar1.Maximum = 200.
progressBar1.Manimum=0.

The Step property is used to set number of steps in a progress bar.

progressBar1.Step = 20.

The Value property is used to set the current value of the status bar.

Protected Sub timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)If progressBar1.Value >= 200 Then
progressBar1.Value = 0.
End If
Return
End
Sub 'timer1_Tick

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.