Progress Bar in VB.Net

Started by karthikn, Aug 01, 2008, 02:59 PM

Previous topic - Next topic

karthikn

Here Some tips to use the Progress bar.

Set the maximum value of the progressbar:



    ProgressBar1.Maximum = 100

Set the number of points the progressbar should step by each time an operation is complete:


    ProgressBar1.Step = 1

In your loop operation that completes the process, perform a step operation each time the process is complete for each loop:


    For x = 0 To n
        'Do operation
        ProgressBar1.PerformStep()
   Next


Reset the progress bar when the loop is complete:


    ProgressBar1.Value = 0

So your whole code should look something like this:


    ProgressBar1.Maximum = 100
    ProgressBar1.Step = 1
    For x = 0 To n
        '
        '
        'Insert your statements here...
        '
        '
        ProgressBar1.PerformStep()
    End For
    ProgressBar1.Value = 0

jeanstorm

The progress bar is a great tool. Progress bar class provides progress bar control functionality in the .NET framework.  Progress Bar App with VB.NET. Progress bar control from tool box and place on form.

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview