Progress bar for a mdi appication
Hi,
I am doing this mdi application where forms read from massave databases on load. I would like to make a popup progress bar in a separate form that will not get stuck while other proceses are running.
I think this is achievable by running the form on a separate thread or something of that kind... if yes.. then how can I do that?
Thaks in advance
[359 byte] By [
Fayed] at [2007-12-16]
Hi Fayed,
You are correct about forms running on seperate threads. A form that's launched by calling .Show() will be on its own thread. It sounds like you might find the new BackgroundWorker component to be useful here. Make a new form, add a ProgressBar and a BackgroundWorker. In the Form Load event, you can set the progress bar's style to Marquee and call RunWorkerAsync on the BackgroundWorker. In the BackgroundWorker's DoWork event, you'll load the data from the database, and on the RunWorkerCompleted event you can hide the form. That should get you started - hope this helps!