-
...to bring my program to an end?
I have seen many different methods lately, and i'm wondering if I have been doing it wrong all these months!
What I currently do is this, I loop through each form in the forms collection unloading each one, then i put the END statement at the bottom after the loop.
Do I need to set frmMain (for example) to NOTHING after I have unloaded it (cant remember if this causes an error or not).
In other words, how do I unload my program completely, freeing up all of the memory it had taken up?
This surprisingly simple procedure has very little documentation in MSDN!
-
if your code is like this:
Code:
Private Sub Form_Load ()
MsgBox "Hello World"
End
End Sub
or....
Code:
Private Sub Form_Load ()
MsgBox "Hello World"
Unload frmMain
End
End Sub
it woun't make a diffrence, but to unload everything completely from the memory, I would add a small "useless" form and unload everything from there then END the program