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]
# 1

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!

RyanCavanaughMS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

Hi Rayan,
Thank you for helping... I have one qestion... what is a background worker and where do I find it?

Fayed at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 3
You can find it under the "Components" toolbox tab while in the Form designer if you're using Visual Studio 2005. In earlier versions of Visual Studio, you'll have to use a Thread object to do something similar.
RyanCavanaughMS at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic Language...