Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
ProgressBarInfo value incrementing
posted

Hello team,

I have a UltraStatusBar and added a Panel whose style is set to Progress. I want to show the user the progress of a long running process with its value. I set the Minimum as 0 and Maximum values as 100.

Now my I have a loop which runs for 265 iterations. Under this loop i am trying to update the ProgressBarInfo value as below, does not seem  mathematically correct though :)

ultraStatusBar1.Panels["TestProgress"].ProgressBarInfo.Value =1;

for(int i=0;i<265;i++)

{

        if( ultraStatusBar1.Panels["TestProgress"].ProgressBarInfo.Value < 100 &&
                             (ultraStatusBar1.Panels["TestProgress"].ProgressBarInfo.Value + 100 / 265 < 100))
          {
                ultraStatusBar1.Panels["TestProgress"].ProgressBarInfo.Value += 100 / 265;
          }

}

I guess the ProgressBarInfo.Value will only increment by 1 and since my loop has to run for 265 times  100/265 gives me a value of 0.377, the value is not getting incremented by this decimal value.

Could you suggest me a logic so that I can show the Progress to the user with 265 iterations when ProgresBarInfo Minimum as 0 and Maximum values as 100?

Any suggestions are highly appreciated.

Parents Reply Children
No Data