Einzelnen Beitrag anzeigen

hboy

Registriert seit: 16. Jan 2004
364 Beiträge
 
#4

Re: Schließen der Form verhindern

  Alt 11. Feb 2004, 21:53
Delphi-Quellcode:
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var msgresult : integer;
begin
  msgresult := 7;
  if levelchanged then
  msgresult := application.MessageBox('Wirklich schliessen?','Beenden',mb_yesno);
  // no: 7 yes: 6
  if msgresult = 6 then
  begin
    Action := caNone;
  end;
end;
Edit: Delphi-tags das Luckie nich motzt *gg*
Power is nothing without TControl
  Mit Zitat antworten Zitat