title: Determine whether a Windows Form has been opened as Modal
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11105262/how-to-know-if-a-form-is-shown-as-dialog">How to know if a form is shown as dialog</a>  </p>
  </blockquote>
  
  
  
  <p>I have a winform that may be opened as a dialogbox, or as a regular window.
  When it is opened as a regular windows I want to hide the OK cancel buttons, is there any way of checking if a winform is opened as a dialogbox or not ?</p>