user should not be able to close form

From Free Pascal wiki
Revision as of 23:51, 10 May 2014 by Michl (talk | contribs) (Created page with "{{user should not be able to close form}} <br> The procedure prevents the termination of the specific program, by the user.<br> Therefor the form event OnCloseQuer...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (de) English (en) français (fr)

The procedure prevents the termination of the specific program, by the user.
Therefor the form event OnCloseQuery must to be adapted.

Beispiel:

uses
  Forms, ...;
  
  ...
  
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin 
  CanClose:=false; 
end;
  
  ...