|
-
Nov 28th, 2000, 02:51 AM
#1
Thread Starter
Lively Member
How to close a form totally in codes ? I was using "form.hide" all the time which I don't think it is appropriate.
-
Nov 28th, 2000, 02:59 AM
#2
Fanatic Member
Whether you have 1 or form or 40 forms this is the best way to make there they all are unloaded.
Code:
Public Sub EndProg()
dim f as Form
For Each f in Forms
f.Hide
Unload f
Next f
End Sub
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Nov 28th, 2000, 03:25 AM
#3
PowerPoster
I did this before, but the memory still not really release after the "For Each f in Forms" routine. Even I add the Set f = Nothing also not mush help in the memory release issue that I encounter. (I monitor the memory usage through the Task Manager.)
How does we recover all the used memory when a form is unload.
-
Nov 28th, 2000, 03:28 AM
#4
Fanatic Member
Code:
Public Sub EndProg()
dim f as Form
For Each f in Forms
f.Hide
Unload f
Next f
End ' Try Adding This also
End Sub
I've heard from a few places that VB has some memory management issues so I'm not sure if that is a possibility.
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Nov 28th, 2000, 03:51 AM
#5
PowerPoster
Hi! YoungBuck, noop... What I mean is I have a MDI Form, when I unload a child form (Main program still running) it did not really release the memory.
-
Nov 28th, 2000, 06:22 AM
#6
Fanatic Member
Chris,
The MDI Child form is associated in memory with the parent form and will leave a footprint. This memory is not released until the parent form is closed.
The way MDI is handled in VB really sucks.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 28th, 2000, 06:34 AM
#7
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|