title: splashscreen not closing properly
body: <p>I'm having some strange problem which I cannot resolve by my self... I have created splash screen (Form3 ~ SplashScreen) using thread, somehow after the application gets to the part </p>
  
  <blockquote>
    <p>thread.Abort();</p>
  </blockquote>
  
  <p>(which actually kills the thread) splash screen stays on the screen until I move mouse on it, or click it somewhere on other form (for instance Form1)... I'm becoming more confused because, this doesn't happen in VS when I run application. The the splash screen is closing properly..., it only happens on the compiled .exe 
  Program.cs</p>
  
  <pre><code>     namespace ICAMReports
   {
       static class Program
      {
  
          [STAThread]
          static void Main()
          {
              Application.EnableVisualStyles();
              Application.SetCompatibleTextRenderingDefault(false);
              Application.Run(new Form1());
          }
      }
   }
  </code></pre>
  
  <p>SplashScreen.cs</p>
  
  <pre><code>    namespace ICAMReports
  {
      public partial class SplashScreen : Form
      {
          public SplashScreen()
          {
              InitializeComponent();
          }
  
          private void timer1_Tick(object sender, EventArgs e)
          {
              progressBar1.Increment(1);
              if (progressBar1.Value == 100)
              {
                  timer1.Stop();
              }
          }
      }
  }
  </code></pre>
  
  <p>Form1.cs</p>
  
  <pre><code>    namespace ICAMReports
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
              Thread th = new Thread(new ThreadStart(splashScreen));
              th.Start();
              Thread.Sleep(3000);
              th.Abort();
          }
          public void splashScreen()
          {
              Application.Run(new SplashScreen());
          }
         //this where the rest of code is placed....
      }
  }
  </code></pre>
  
  <p>Any clue, why is this happening or how to fix this?</p>
  
  <p>screenshot:<img src="https://i.stack.imgur.com/BLmf8.jpg" alt="Splashscreen not closing after Form1 is loaded..."></p>