user should not be able to close form

From Free Pascal wiki
Revision as of 23:53, 10 May 2014 by Michl (talk | contribs)
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;
  
  ...