title: Catching the close event on a c# form
body: <p>Hey! I am not trying to push my luck here but I have another c# question.
  I have tried every possible event I found using google.
  Here is the code:</p>
  
  <pre><code> private void Form1_OnClose()
          {
              MessageBox.Show("I was closed -2");
          }
  
          private void Form1_Exit(object sender, EventArgs evArgs)
          {
              MessageBox.Show("I was closed -1");         
          }
          private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
          {
              MessageBox.Show("I was closed 0");
          }     
  
          private void Form1_Closed(object sender, EventArgs e)
          {
              MessageBox.Show("I was closed 1");
          }
          private void Form1_FormClosed(Object sender, FormClosedEventArgs e)
          {
  
              MessageBox.Show("I was closed 2");
          }
  </code></pre>
  
  <p>Not one of these trigger anything when I either do Alt+f4 or click on the X button.
  What am I doing wrong here?</p>