Modal Form
From: Mike Hubbard (mmhubbard_at_socal.rr.com)
Date: 10/30/03
- Next message: Dimitrij Klingbeil: "Re: About Lists of Pointers"
- Previous message: Chris Burrows: "Re: How to find out if its a Number or String character?"
- Next in thread: John Herbster \(TeamB\): "Re: Modal Form"
- Reply: John Herbster \(TeamB\): "Re: Modal Form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 15:38:44 -0800
I have the following code:
procedure ShowSomeForm;
begin
if Assigned(gSomeForm) then
begin
gSomeForm.ModalResult := mrOk;
Application.ProcessMessages;
end;
gSomeForm := TSomeForm.Create(nil);
try
gSomeForm.ShowModal;
finally
FreeAndNil(gSomeForm);
end;
end;
procedure TSomeForm.FormClose(Sender: TObject; var Action:
TCloseAction);
begin
// free form
Action := caFree;
gSomeForm := nil;
end;
Why doesn't the FormClose event ever fire when gSomeForm.ModalResult
is set? The event fires if a button on the form is pressed whose
ModalResult property is set to mrOk.
Thanks.
Mike
- Next message: Dimitrij Klingbeil: "Re: About Lists of Pointers"
- Previous message: Chris Burrows: "Re: How to find out if its a Number or String character?"
- Next in thread: John Herbster \(TeamB\): "Re: Modal Form"
- Reply: John Herbster \(TeamB\): "Re: Modal Form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]