title: An Event Handler when Close Button is clicked in windows form
body: <p>I was wondering if there are any event handlers if the user clicked the close button in a windows form. My initial plan was when the user clicked the close button, it will return a boolean to the caller or whoever called that form. for example</p>
  
  <pre><code>public void newWindow(){
  
        NewForm nw = new NewForm();
        nw.ShowDialog();
        if(nw.isClosed){
         do something
     }
  
  }
  </code></pre>
  
  <p>is that possible?</p>