Please review the following code:
var splashForm = new SplashForm();
m_Thread = new Thread( () => System.Windows.Forms.Application.Run( splashForm ) )
m_Thread.Start();
splashForm.Shutdown();
System.Windows.Forms.Application.Run( mainForm );
It seems that everything is working fine: first I see a splash screen, later the mainform starts. But for some reason I get strange errors, for example: graphic elements (infinite ProgressBar) are not displayed correctly.
EDIT : I have two progress panels, one on the splash screen, on the main form. Both of them show the same (wrong) behavior in endless mode: there is no progress, only a clean background. / EDIT
In my opinion, this is due to a call Application.Run()for different threads. These errors can be eliminated by calling any function / mainForm property before running splashscreen - for example,
mainForm.Text = mainForm.Text;
- , - , - ?
splashscreen, , -. . !