Article View: borland.public.cppbuilder.nativeapi
Article #12322Re: MDI application save system resource.
From: Cactus
Date: Wed, 10 Dec 2003 07:40
Date: Wed, 10 Dec 2003 07:40
28 lines
1705 bytes
1705 bytes
> > I move children Form to main Form body.
>
> You mean: I do not let the program autocreate all the forms, but
> will create a form dynamic when needed ?
>
> > that could save system resource?
>
> Yes. Also do delete them when not needed.
>
I no idea how about the Application does.
when parent Form is close, all children form also close.
even no delete operates.
the destructor ~Form() may be call when a Form closing.
> > void __fastcall TArchForm::ChildrenBittonClick(TObject *Sender)
> > {
> > Application->CreateForm(__classid(TChildrenForm), &ChildrenForm);
>
> Do not use Application->CreateForm(). Use new instead.
>
> ChildrenForm = new TChildrenForm ( this );
>
Ok, if that is better.
regards.
Technical Details
Message-ID:
<3fd6cddf@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3fd477ec@newsgroups.borland.com> <3fd57cfe$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,50bbf5166b66d02 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-09 23:50:46 PST From: "Cactus" <a@b.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fd477ec@newsgroups.borland.com> <3fd57cfe$1@newsgroups.borland.com> Subject: Re: MDI application save system resource. Date: Wed, 10 Dec 2003 15:40:19 +0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 218.15.224.17 Message-ID: <3fd6cddf@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071042015 218.15.224.17 (9 Dec 2003 23:40:15 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail