title: Thread not starting after Thread Sleeep
body: <p>In this i am using stopwatch. when stop watch value between 0 to 15 it will play video on screen 1 and after 15 it will display on screen 0 but thread is not starting after <code>Thread.sleep()</code> </p>
  
  <pre><code>public partial class Form2 : Form
  {
      int[] screentimings = new int[2] { 20, 20 };
      Stopwatch sp;
      Thread thread1;
      //private System.Timers.Timer _timer = new System.Timers.Timer();
  
      public Form2()
      {
          InitializeComponent();
          thread1 = new Thread(new ThreadStart(A));
         thread1.SetApartmentState(ApartmentState.STA);
          sp = new Stopwatch();
          sp.Start();
          thread1.Start();          
      }
         [STAThread]
      public void showOnMonitor(int showOnMonitor) 
      { 
          Screen[] sc; 
          sc = Screen.AllScreens; 
          Form1 f = new Form1(); 
          f.FormBorderStyle = FormBorderStyle.None; 
          f.Left = sc[showOnMonitor].Bounds.Left; 
          f.Top = sc[showOnMonitor].Bounds.Top;
          f.Height=sc[showOnMonitor].Bounds.Height;
          f.Width=sc[showOnMonitor].Bounds.Width;
          f.StartPosition = FormStartPosition.Manual; 
          f.ShowDialog(); 
      }
  
      [STAThread]
      private void A()
      {
          long i = sp.Elapsed.Seconds;
          if (i &gt; 0 &amp;&amp; i &lt; 15)
          {
              showOnMonitor(1);
          }
          else
          {
              showOnMonitor(0);
          }
          Thread.Sleep(500);
      }
  }
  </code></pre>
  
  <p>showOnMonitor(1) code is executed but after 15 seconds showOnMonitor(0) is not working. 
   I am new with thread don't know whats wrong with it. It might be because of <code>[STAThread]</code> without this it giving Single Thread Exception. </p>