title: Delphi - stop the application on the main form create
body: <p>The situation is the following one: on the application main form create event some conditions are not respected, so the application needs to close. </p>
  
  <p>Yes, this is a bad design but how the application should be closed? Using the Application.MainForm.Close generates an AV. <a href="http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.Forms.TApplication.Terminate" rel="nofollow noreferrer">Application.Terminate</a> is not a very good choice. Other ideas?</p>