Using the Progress Bar Control

Lanc1988

Contributor
Joined
Nov 27, 2003
Messages
508
I'm trying to use the progress bar control to display how much percent the user has completed until he/she reaches the next level.

So I have it where the user enters their current level then enters their target level and I want it so when they click calculate it changes the percent bar (progress bar) to show how much percent they have completed.

So somehow I need to do something like the following:
Visual Basic:
ProgressBar = (Target / Current * 100)
 
What is the measurement for target and current?

Set Minimum = 0, Maximum = Target, Value = (current * 100) / target

And make sure to use a correct measurement.
 
Actually, if you made the Maximum Target, then you can just set the value of the progressbar to be Current.
:)

(If Target was 10, and Current was 5, Max would be 10 and Value would 50, which is too high)
 
I made a mistake. Set the maximum to 100 and then use the calculation i gave. That will give the percentage.
 
Back
Top