Thanks again, David.  I must admit that I've never quite got to grips with the 
Close v Release debate (and I've seen it rage in this or that forum on a number 
of occasions), but doesn't Borland itself recommend that you use Release when 
closing a form from an event within the form itself such as a button click?  
Or, do you mean Form.Close should be used in this particular scenario of 
multiple instances? 

Regards
Steve

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of David Smith
Sent: 17 November 2008 22:34
To: [email protected]
Subject: RE: [delphi-en] Multiple instances of form


No, you should never do that. Just use form.close, and use the OnClose event 
(Action := caFree;) to release the form.  You'll have to use the Screen.Forms 
property to determine if any instances are loaded.




***************************************************************************
This e-mail and any files transmitted with it are confidential. If you are not 
the intended recipient, any reading, printing, storage, disclosure, copying or 
any other action taken in respect of this e-mail is prohibited and may be 
unlawful. If you are not the intended recipient, please notify the sender 
immediately by using the reply function and then permanently delete what you 
have received.
Content of emails received by this Trust will be subject to disclosure under 
the Freedom of Information Act 2000, subject to the specified exemptions, 
including the Data Protection Act 1998 and Caldicott Guardian principles.
This footnote also confirms that, unless otherwise stated, this email message 
has been swept by Sophos Anti-virus for the presence of computer viruses.
***************************************************************************

Reply via email to