Mega Code Archive

 
Categories / Delphi / Forms
 

How to cancel showing of a form

Title: How to cancel showing of a form Imagine you have a form and after doing some checks in its OnShow handle, decide rather not to have it on the screen. procedure TForm1.Form1OnShow (Sender : TObject); begin ... PostMessage (Handle, wm_Close, 0, 0); end;