Article View: borland.public.cppbuilder.nativeapi
Article #4799Re: closing form
From: Alfred
Date: Wed, 23 Nov 2005 11:21
Date: Wed, 23 Nov 2005 11:21
18 lines
1563 bytes
1563 bytes
Thank you very much. I am making a lot of error :( >> bool __fastcall TForm1::ExecuteFile(String FileName) > >You should always pass strings by const reference. > bool __fastcall TForm1::ExecuteFile(const AnsiString &FileName) Why "const AnsiString &FileName" and not a simple "String FileName" ? What is the difference ? >A better approach would be to not even create the TForm at all unless you >are actually going to use it. You can do that moving the code into the >WinMain() function for the project, ie: Thats is a great code. Thank you very much Alfred
Technical Details
Message-ID:
<43845eca$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9d517b38f0628b82 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Alfred" <alf@no.spam.not.valid.email> Sender: "Alfred" <alf@no.spam.not.valid.email> Reply-To: "Alfred" <alf@no.spam.not.valid.email> Subject: Re: closing form Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 82.52.159.47 References: <4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <43845eca$1@newsgroups.borland.com> Date: 23 Nov 2005 04:21:30 -0700 X-Trace: newsgroups.borland.com 1132748490 207.105.83.66 (23 Nov 2005 04:21:30 -0700) Lines: 18 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail