Results 1 to 3 of 3

Thread: UnLoad

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    If a new instance of the form was created, the I can see setting it to nothing. But, in the case of a single instance, unloading it is sufficient.

  2. #2
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    When multiple instance of the same form are in place..setting each instance to nothing after unloading makes it sure that the object doesn't take the memory anylonger...

  3. #3
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    One good and bad thing about the unload function is that any public variables on that form will still be accessible after it has been unloaded.

    Therefore, if you load a form modally, then unload it and want to know something about the form, providing you store it in a public variable on the form it will still be available to the calling procedure until you set the form = nothing.

    eg;

    Load MyPopUp
    MyPopUp.Show 1

    If MyPopUp.PublicVar = "This" then DoSomething

    Set MyPopup = Nothing
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

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