title: Using Application.Run() on different threads
body: <p>Please have a look at the following code:</p>
  
  <pre><code>var splashForm = new SplashForm();
  m_Thread = new Thread( () =&gt; System.Windows.Forms.Application.Run( splashForm ) )
  m_Thread.Start();
  
  // Do some initialization
  // ...
  
  // the following method just invokes `Close()` on the right thread
  splashForm.Shutdown();
  
  // Loop until the thread is no longer alive
  // ...
  
  System.Windows.Forms.Application.Run( mainForm );
  </code></pre>
  
  <p>It looks as if all works fine: first I see the splashscreen, later the mainform gets started. But somehow I get strange errors, like: graphical elements (a endless ProgressBar) are not showing up correctly.<br>
  <strong>EDIT</strong>: I have two progressbars, one on the splashscreen, on on the mainform. They both show the same (wrong) behaviour in endlessmode: no progress, just the pure background.<strong>/EDIT</strong><br>
  In my opinion this is due to the call of <code>Application.Run()</code> on different threads. This errors can be eliminated by calling any function/property of the mainForm before starting the splashscreen - like, for instance</p>
  
  <pre><code>mainForm.Text = mainForm.Text;
  </code></pre>
  
  <p>Can anyone please confirm that this code can cause problems - or that it should behave alright and I have to look for the error somewhere else?<br>
  I already looked for splashscreen implementations and I know that it can be done differently. But I am interested in understanding this implementation and its possible problems. Thanks!</p>