UI Thread in C#
-
Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.
-
Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.
Maybe try it the other way around. You have a "splash" type screen which is your main constructor. It can load fast as it is small. It fires off a thread that starts the loading of the main app which uses delegates or some such to report back on the loading progress. Here is an article that may help you out; A Pretty Good Splash Screen in C# regards, Paul Watson South Africa The Code Project
-
Hi All, How to spawn a UI Thread in C#. I want to show window having ProgressBar while starting application(from main window constructor),application takes some time to start. The window having progressbar should run in different thread having it's own message que and all. Thanks TusharM.
You can use Application.Run more then once in an Application. Try creating new splash form, pass it to Appication.Run method then run your main form (Application.Run(new MainForm());) When you need to close the splash screen just close the splashForm (splashForm.BeginInvoke(new MethodInvoker(splashForm.Close));)