Progress Bar stops working?



I am using VB.NET 2005, but I have seen this problem in 2003 also. I
have a windows form based application. When the user clicks on the main
command button it goes off and does its thing. It updates a progress
bar as data is processed and is also incrementing counters that are
boing displayed in two textboxes. If I click on another window at this
time and my application loses focus, the progress bar and textbox
updating stops even though the application is still running. Even
clicking back in its window to give it focus back does not cause the
progress bar and textbox updating to resume. Anyone know why this is
happening and a possible way to stop it from happening? I've seen many
apps in my day that had a progress bar that kept working even if the
window lost focus.




Most likely cause is because the main app thread is busy with the operation
and it does not get a chance to process messages to repaint itself and do
other stuff that is necessary to be done when an app gets focus. Doing the
operation on a background thread is a possible solution

-Atul, Sky Software
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question