Link to home
Start Free TrialLog in
Avatar of angus_young_acdc
angus_young_acdcFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Update Label On Another Thread?

Hey Experts,

I have a splash screen, which is just a form that creates a thread for itself (so that the people who use it don't have to).  Anyway I am hoping to add a label to update with information, but as it's a completely different thread I can't see to find a way.

Anyway, how can I update a label on SplashForm from a method call in MainForm.  It currently works similar to the following:

(In MainForm)
SplashForm splash = new SplashForm();
splash.StartSplash(); // Which contains a method to create a thread
// Do actions
splash.LoadingMessage = "MyMessage";
splash.CloseSplash();
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

How can I update my user interface from a thread that did not create it?
http://blogs.msdn.com/csharpfaq/archive/2004/03/17/91685.aspx

Updating the UI from a Secondary Thread
http://msdn.microsoft.com/en-us/magazine/cc188732.aspx

Perhaps you should take a look at this article: Updating the UI from a Secondary Thread
http://msdn.microsoft.com/en-us/magazine/cc188732.aspx
http://weblogs.asp.net/justin_rogers/articles/126345.aspx
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial