[DUG] Closing a modal form from code in it

russell russell at belding.co.nz
Sat May 7 22:19:23 NZST 2011


Hi John

In the FormClose(sender , action) procedure have you tried action := caFree?

Russell

 

From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of John Bird
Sent: Saturday, 7 May 2011 9:46 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Closing a modal form from code in it

 

I have a modal form that gets called to do some processing (involving Indy), and when it has finished if all is OK I am trying to get the end code after the Indy stuff to show status (which it does) and close the form (which it doesn’t).

 

The statement form2.close is being executed but is not closing the form.

What can stop a modal form being closed,  or any ideas what I need to do to get it to close by itself when its finished?

 

(The form is opened by form2.ShowModal

and the code is in a procedure executed from the OnActivate event  - the Show event also doesn’t work)

 

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110507/a184fbe7/attachment.html 


More information about the Delphi mailing list