title: C# Opening a Form, then closing it from another method
body: <p>I am pretty new to C# and having a little issue with something. I believe threading may be the answer, but thats just a Buzz-Word I have picked up when looking for solutions.</p>
  
  <pre>
  namespace Test
  {
      public partial class Form1 : Form
      {
          private Form2 form2;
  
          public Form1()
          {
              InitializeComponent();
              form2 = new Form2();
          }
  
          private void runCheck(object source, System.Timers.ElapsedEventArgs e)
          {
              form2.ShowDialog();
              form2.TopMost = true;
          }
  
          private void runCheckFalse()
          {
              form2.Hide();
          }
  }
  </pre>
  
  <p>This is only a quick code snippet of my stripped out application, however when trying this I get an error: Cross-thread operation not valid: Control 'Form2' accessed from a thread other than the thread it was created on.</p>
  
  <p>Also as a side note I am using form2.TopMost = true; to attempt to open the window on top of <em>everything else</em>, but this often ends up at the back behind Visual Studio etc</p>