uppps, falsch geguckt .... war caNone, nicht mrNone ... und davor den Variablennamen nicht nochmal gelesen
Delphi-Quellcode:
procedure TCustomForm.Close;
var
CloseAction: TCloseAction;
begin
if fsModal in FFormState then
ModalResult := mrCancel
else
function TCustomForm.ShowModal: Integer;
begin
...
ModalResult := 0;
repeat
...
Application.HandleMessage; <<<<<<<<<<<<<<< hier würde das .Close ausgeführt oder ein ModalResult gesetzt
if Application.Terminated then ModalResult := mrCancel else
if ModalResult <> 0 then CloseModal;
until ModalResult <> 0;
procedure TCustomForm.CloseModal;
var
CloseAction: TCloseAction;
begin
try
CloseAction := caNone; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
if CloseQuery then