Results 1 to 2 of 2

Thread: Whats the best way...

  1. #1
    Guest
    ...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!

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    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
    NXSupport - Your one-stop source for computer help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width