procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); begin Winhelp(Handle, 'WINHELP.HLP', HELP_QUIT, 0); Action := caFree; end;