Simple progress bar code not working correctly.
-
Good morning. I have the following code:
uipc.tsProgBar.Style = ProgressBarStyle.Marquee;
uipc.tsProgBar.MarqueeAnimationSpeed = 100;// Do some processes
uipc.tsProgBar.Style = ProgressBarStyle.Continuous;
uipc.tsProgBar.MarqueeAnimationSpeed = 0;If I put a messagebox after the uipc.tsProgBar.Style = ProgressBarStyle.Marquee; uipc.tsProgBar.MarqueeAnimationSpeed = 100; , then the progress bar with start "scrolling" and stop when the user click Ok on the messagebox. Any suggestion? Thank you, WHEELS
-
Good morning. I have the following code:
uipc.tsProgBar.Style = ProgressBarStyle.Marquee;
uipc.tsProgBar.MarqueeAnimationSpeed = 100;// Do some processes
uipc.tsProgBar.Style = ProgressBarStyle.Continuous;
uipc.tsProgBar.MarqueeAnimationSpeed = 0;If I put a messagebox after the uipc.tsProgBar.Style = ProgressBarStyle.Marquee; uipc.tsProgBar.MarqueeAnimationSpeed = 100; , then the progress bar with start "scrolling" and stop when the user click Ok on the messagebox. Any suggestion? Thank you, WHEELS
If you're doing your processes on the main thread then the gui won't be able to update as you'll have hold of the thread. Look at using a BackgroundWorker so your gui remains responsive.
-
If you're doing your processes on the main thread then the gui won't be able to update as you'll have hold of the thread. Look at using a BackgroundWorker so your gui remains responsive.