Multithreading problem?

knappster

Active member
Joined
Nov 13, 2006
Messages
42
Programming Experience
Beginner
Hi,
I have a windows forms program that uses docking windows. Now, when somebody logs in, I want to display a tool strip progress bar so that the user can see that the program is doing something as it can take a good few seconds for all the docking window layouts to load and then display. I have looked at the backgroundworker control to run the progress bar but cannot seem to get it to work. I think it is because the progress bar is part of the main UI and you can't touch the UI from a backgroundworker control. I put a breakpoint on the BackgroundWorker1_ProgressChanged sub and it doesn't get called until all the docking windows have finished loading.

Anyone have any ideas of how to do this??
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
You would need to have the Background worker on the main form, and the DoWork event of the BW would load the other forms/windows and do the "docking", the main form would not be able to do this as it would be tied up with the docking code and would not be able to update a progress bar
 
Top Bottom