title: Application.Exit() isn't working as expected
body: <p>I have 2 forms (<code>main</code> and <code>login</code>). I open the login form with this piece of code:</p>
  
  <pre><code>toolStripProgressBar1.Value = 50;
  toolStripStatusLabel_dynamic.Text = "Proberen toegang te verkrijgen...";
  Login login = new Login();
  login.ShowDialog();
  do_login();
  </code></pre>
  
  <p>And I have a toolstrip menu at the top of the login form with an <code>eventhandler</code> like this:</p>
  
  <pre><code>private void afsluitenToolStripMenuItem_Click(object sender, EventArgs e) {
      Application.Exit();
  }
  </code></pre>
  
  <p>But after both forms are closed, the program continues to work (it calls the function <code>do_login</code>.) But the variables aren't set, and the form is gone, so <code>do_login</code> won't work at all...</p>
  
  <p>So how will I make the whole execution of the program stop when I click the toolstrip?</p>