title: Close form in a timed event
body: <p>I can't make the form "frmDOOR" close in 'OnTimeEvent'.</p>
  
  <pre><code>frmDOOR close = new frmDOOR
  close.close();
  </code></pre>
  
  <p>It's not working. It even makes the timedevent repeat itself even though I have autoreset set to false. I hope you can find out what I'm doing wrong, it's driving me crazy!</p>
  
  <pre><code>public partial class frmDOOR : BASEFORM
  {
      public frmDOOR()
      {
          InitializeComponent();
          System.Timers.Timer aTimer = new System.Timers.Timer();
          aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
          aTimer.Interval = 1000;
          aTimer.AutoReset = false;
          aTimer.Enabled = true;           
      }
  
      private static void OnTimedEvent(object source, ElapsedEventArgs e)
      {                
          frmUser regform = new frmUser();
          regform.StartPosition = FormStartPosition.CenterParent;            
          regform.ShowDialog();
      }        
  }
  </code></pre>