• We just launched and are currently in beta. Join us as we build and grow the community.

Progress Bar

arnodevos0073

Anime Music Curator
A Rep
0
0
0
Rep
0
A Vouches
0
0
0
Vouches
0
Posts
157
Likes
67
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Progress Bar is used to give visualization about the status of the current process and computer operation, such as a downloading , transferring of files, installation and more. Your application will look more professional if you are implementing a complex data processing using the Progress Bar.
This time, we will create an example of a Progress Bar using Visual Basic. First, open visual basic and create a new project then, save it as “ProgressBar”. Then from the toolbox add a progressbar,label, button and a timer.
Next, we’re going to add functionality to our application. First, you need to set the progress bar's minimum value to 0 and the maximum value to 100. And double click the timer1, and add the following code:
  1. 'test if the value of progress bar is greater than or equal to 100
  2. If

    ProgressBar1.

    Value

    >=

    100

    Then
  3. 'set the value to minimum value which is equal to zero
  4. ProgressBar1.

    Value

    =

    0
  5. Else
  6. 'increment the value of progress bar by 1
  7. ProgressBar1.

    Value

    =

    ProgressBar1.

    Value

    +

    1
  8. 'display the current percent of the progress.
  9. Label1.

    Text

    =

    ProgressBar1.

    Value

    &

    "% Completing..."
  10. End

    If

To activate the timer, double click the button. And add the following code:
  1. Timer1.

    Start

    (

    )

Then press “F5” to run your application.

Here’s the example output after completing the course.
progress.png


Book traversal links for Progress Bar

  • ‹ PictureBox Control
  • Up
  • ProgressBar Control ›

 

442,401

317,942

317,951

Top