<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
 <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
 </head>
 <body>
  <p> </p>
  <div style="margin: 5px 0px;">
   <br/>
   Salvatore Coppola <coppolastudio@gmail.com> hat am 14. März 2012 um 11:57 geschrieben:
   <br/>
   <br/>
   > Set in the Object Inspector Borderstyle to bsDialog and the form
   <br/>
   > behavior should be what you need
  </div>
  <p style="margin: 0px;"> </p>
  <p style="margin: 0px;"> </p>
  <p style="margin: 0pt;">
   <span>
    <span></span>
    BorderStyle has nothing to do with ModalResult.
   </span>
  </p>
  <p style="margin: 0pt;">
   <span> </span>
  </p>
  <p style="margin: 0pt;">
   <span>This is enough to close a modal dialog: </span>
  </p>
  <p style="margin: 0pt;">
   <span> </span>
  </p>
  <p style="margin: 0pt;">
   <span>procedure TForm1.Button1Click(Sender: TObject);</span>
  </p>
  <p style="margin: 0pt;">
   <span>begin</span>
  </p>
  <p style="margin: 0pt;">
   <span>  ModalResult:=mrOk; </span>
  </p>
  <p style="margin: 0pt;">
   <span>end; </span>
  </p>
  <p style="margin: 0px;"></p>
  <p style="margin: 0px;">Note: </p>
  <p style="margin: 0px;">When a button's Modalresult is set, it will do the above when clicked.</p>
  <p style="margin: 0px;">Setting the Button1.ModalResult alone will not close the form.  </p>
  <p style="margin: 0px;"> </p>
  <p style="margin: 0px;">Mattias</p>
  <p style="margin: 0px;"> </p>
  <p> </p>
 </body>
</html>