title: Get DialogResult from custom dialog
body: <p>I have some custom made dialog that have on it Set Button , I want when i exit from <code>newBlockForm.ShowDialog(this);</code> to get the dialog result if the user pressed on that button or not .</p>
  
  <p>Like i would do in winforms dialog </p>
  
  <pre><code>if(MessageBox.Show("Exit?", "Close UP", 
       MessageBoxButtons.YesNo)== DialogResult.Yes)
  </code></pre>
  
  <p>Any idea how i do so ?</p>