title: Winform Forms Closing and opening a new form
body: <pre><code>1. frmHome frm = new frmHome();
     frm.Show();
     this.Close();
  </code></pre>
  
  <p>I'm opening <code>HomeForm</code> from <code>LoginForm</code>.  In <code>LoginForm</code>'s <code>form_closed</code> event I call <code>Application.Exit()</code>.   This allows you to open <code>LoginForm</code> and exit the application by clicking the <code>X</code> button.</p>
  
  <p>The problem is when I move from <code>LoginForm</code> to <code>HomeForm</code> and call <code>this.Close()</code>, the <code>form_closed</code> event of <code>LoginForm</code> triggers and the application gets closed.</p>
  
  <p>I am allowed to show only one form at a time. </p>