Board index » delphi » I wantto get the modalresult from a form a modaless mdichild form. (not in a dll)

I wantto get the modalresult from a form a modaless mdichild form. (not in a dll)


2003-10-02 04:38:05 PM
delphi145
(sorry previous message has missmatched words)
I wantto get the modalresult from a form a modaless mdichild form. (not in
a dll)
how can I use application.dialoghandle ?
or repeat until code s{*word*196}t to get the modalresult.
but however how can I pass the modalresult. so mdichild is freeing with
caFree to close.
 
 

Re:I wantto get the modalresult from a form a modaless mdichild form. (not in a dll)

"kursat" <XXXX@XXXXX.COM>writes
Quote
(sorry previous message has missmatched words)
I wantto get the modalresult from a form a modaless mdichild form. (not
in
a dll)
TOnMyClose = procedure(const aSender: TObject; const aResult: TModalResult)
of object;
TMyChildForm = class(TForm)
private
FOnMyClose: TOnMyClose;
FCloseResult : TModalResult;
public
procedure Execute(const aCloseListener: TOnMyClose);
end;
procedure TMyChildForm.Execute(const aCloseListener: TOnMyClose);
begin
FOnMyClose := aCloseListener);
Show;
end;
// Set FCloseResult in your buttons.
procedure TMyChildForm.FormClose(...
begin
if assigned(FOnMyClose) then
FOnMyClose(Self, FCloseResult);
Action := caFree;
end;