user should not be able to close form/de
Zurück zur Seite Code Beispiele.
Die Prozedur verhindert das Beenden des eigenen Programms durch den Anwender.
Dafür muss das Ereignis OnCloseQuery der Form angepasst werden.
Beispiel:
uses
Forms, ...;
...
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose:=false;
end;
...From the Free Pascal wiki, page "user should not be able to close form/de", as it stood on 2020-03-03 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.