🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.winforms.controls.using
Article #138

Re: closing a form

#138
From: Guido Cavalera
Date: Sun, 18 Jun 2006 09:24
56 lines
2351 bytes
Dear Marc, this is an unit example to manage form :

//declaration section
public
    constructor Create;
    Class Function ShowMenu: System.Windows.Forms.DialogResult;
end;

// implementation
Class Function TfrmMenu.ShowMenu:System.Windows.Forms.DialogResult;
Begin
  With TfrmMenu.Create Do
    Result:=ShowDialog();
End;

//close form
procedure TfrmMenu.btMain_Click(sender: System.Object; e: System.EventArgs);
begin
  Close();
end;


When i invoke this form i write :

 If TfrmMenu.ShowMenu() = System.Windows.Forms.DialogResult.Yes Then 'Do 
something'


This Ok ? the memory is free or the form are always created and not 
destroyed ?

Thank very much.




-- 
Guido Cavalera
www.OnAzienda.it
"Marc Rohloff [TeamB]" <"on request"> ha scritto nel messaggio 
news:wknorh5mcznl.dlg@dlg.marcrohloff.com...
> On Sat, 17 Jun 2006 12:58:42 +0200, Guido Cavalera wrote:
>
>> ...but close form in a Compact Framework Application, free the memory ? 
>> My
>> pocket application after a bit time slow its performance ... Is a memory
>> question ?
>
> Depending on the platform your application may not end it might just
> be kept open in the background.
> I seem to remember that the solution is to set the forms minimize
> property to false.
>
> -- 
> Marc Rohloff [TeamB]
> marc rohloff -at- myrealbox -dot- com 
Technical Details
Message-ID: <44951be1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <4493e05e@newsgroups.borland.com> <wknorh5mcznl.dlg@dlg.marcrohloff.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1eff29,78d0e9f49945f91c
X-Google-Attributes: gid1eff29,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Guido Cavalera" <cavaleraguido@novet.it>
Newsgroups: borland.public.delphi.winforms.controls.using
References: <4493e05e@newsgroups.borland.com> <wknorh5mcznl.dlg@dlg.marcrohloff.com>
Subject: Re: closing a form
Date: Sun, 18 Jun 2006 11:24:55 +0200
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 62.94.41.51
Message-ID: <44951be1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1150622689 62.94.41.51 (18 Jun 2006 02:24:49 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!feeder02.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail