Hi Ross,

Are you sure your not talking about changing the caption string as 
opposed to the application title ?

KR,
Grant Brown

Ross Levis wrote:
> I regularly change the Application Title in the main form and it has never
> crashed.  I use it to display progress of some processing while the app is
> minimized.
>
> Ross.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Barton Bresnik
> Sent: Friday, 3 August 2007 13:55
> To: [email protected]
> Subject: Re: crashes when I try to use Application.Title
>
> This issue may trace back to MS Windows API: memory must be allocated for
> the title. If you set the title at design time, Delphi is usually
> intelligent enough to pre-allocate the memory. At run time, setting it equal
> to a string value will crash an app, because strings are lifetime-managed:
> once it goes out of scope (e.g. at the end of a procedure), the title points
> to an invalid location.
>
> Work-arounds: global strings that last the lifetime of the app; allocate
> memory for a buffer; allocate an array of char...
>
> Bart
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
>
>   


-- 
Kind Regards
Grant Brown

SiteDoc Pty Ltd
mob: 0412 926 995
www.sitedoc.com.au
__________________________________________________________________________________________________________
This email message together with any attachments is intended only for the 
addressee(s) and contains information that may be confidential and/or 
copyright.  If you are not the intended recipient, please notify the sender by 
reply email (or telephone SiteDoc Pty Ltd on +61 2 42291185) and immediately 
delete this email together with any attachments from your computer. If you are 
the intended recipient, you must not copy, disclose, reproduce or distribute 
this communication together with any attachments without the authority of 
SiteDoc Proprietary Limited. No representation is made that this email or any 
attachments are free of viruses. Virus scanning is recommended and is the 
responsibility of the recipient. Unless specifically stated by the sender as 
the views of SiteDoc Proprietary Limited, any views expressed in this message 
are those of the individual sender, and no responsibility will be borne by 
SiteDoc Proprietary Limited for its content or outcomes.


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to