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.


--- On Mon, 11/17/08, Wilson, Stephen <[EMAIL PROTECTED]> wrote:
From: Wilson, Stephen <[EMAIL PROTECTED]>
Subject: RE: [delphi-en] Multiple instances of form
To: [email protected]
Date: Monday, November 17, 2008, 7:57 AM










    
            Thanks, David -it's exactly what I need.  If I have a button on the 
form and call Release in its OnClick, this will destroy individual instances, 
will it not?



Regards



Steve



-----Original Message-----

From: [EMAIL PROTECTED] ps.com [mailto:[EMAIL PROTECTED] ps.com]On

Behalf Of David Smith

Sent: 17 November 2008 11:21

To: [EMAIL PROTECTED] ps.com

Subject: Re: [delphi-en] Multiple instances of form



Set the form variable as a local variable and you won't have that problem since 
the form variable goes out of scope after each instance creation. You can 
destroy it in OnClose.



************ ********* ********* ********* ********* ********* ********* 
*********

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.

************ ********* ********* ********* ********* ********* ********* 
*********




      

    
    
        
         
        
        








        


        
        


      

[Non-text portions of this message have been removed]

Reply via email to