Hello,
on my program:
var
ts: TFw;
res: TModalResult;
begin
try
ts := TFw.Create(self);
ts._productCode := 'xyz';
ts._language := 'en';
ts._productVersion := 1;
res := ts.ShowModal;
ShowMessage(IntToStr(res));
finally
ts.Free;
end;
end;
I have to return a status to the modal form in order to understand if the user has pressed the 'ok' or 'abort' button
, but in the TFw form, on the abort button I wrote this code :
Self.ModalResult:=mrAbort;
self.Close;
this on the ok button:
Self.ModalResult:=mrOK;
self.Close;
but on res variable i obtain same value, it is obvious that I am doing something wrong, what is the correct way to handle the return of a modal form?
Thanks in advance.