//doing property names from top of my head so use common sense and set to
what i obviously mean
// also i am assuming your step is set at 1
ProgressBar1.Max = 55;
i = 55;
for (int x= 0; x < i; x++)
{
if(ProgressBar1.Value < ProgressBar1.Max)
ProgressBar1.PerformStep().
}
That would step by 1 every iteration and on the value equaling the max the
bar would stop.
Why are you doing it this way anyway? This just for testing it?
Remember fire your progress bar on a new thread to measure whatever it is
that is loading and so on so that it doesn't block your processing thread of
data that it is measuring.
Hope that helps, difficult to know how much use it is when the code above
would only be useful for testing and experimenting with how a progress bar
works.
"Alan T" <al*************@yahoo.com.auwrote in message
news:Ow****************@TK2MSFTNGP03.phx.gbl...
Sometimes I have to loop thru' 55 times, sometimes 240 times.
How do I set the Maximum and, Step property of progress bar so that it
reflects the progress inside the while loop?
i = 55;
for (int x= 0; x < i; x++)
{
.....
ProgressBar1.PerformStep().
}