title: How to know if user clicked on X in the form
body: <p>Thanks to everyone who takes effort on answering my question.</p>
  
  <p>I'm using WinForms C#, and on the MainForm_Load, I'm calling the Login form for the user. The Login form contains the X button (the default button on the top-right) and Loginbutton.</p>
  
  <p>Now...</p>
  
  <p>If the user decides to click on the X button the Login form closes and so should the MainForm, which I know how to do. But... if the user clicks on LoginButton the LoginForm should close, but the MainForm should stay opened.</p>
  
  <p>Any idea hwo to do that ?</p>