Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Best way to end a form

Best way to end a form

Scheduled Pinned Locked Moved Visual Basic
performancehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yuniit
    wrote on last edited by
    #1

    Hi all, I have a problem. I have 1 exe and several dll's. From my exe (mostly an MDI form) I call to the different dll's which contain mainly forms. When I want to close such a form, what's the best method 'Close()' or 'Dispose()'. You see, I want to be sure that the complete dll is removed from memory each time, since it is called by 'objAssembly.CreateInstance'... Greetings, Sigurd

    D 1 Reply Last reply
    0
    • Y yuniit

      Hi all, I have a problem. I have 1 exe and several dll's. From my exe (mostly an MDI form) I call to the different dll's which contain mainly forms. When I want to close such a form, what's the best method 'Close()' or 'Dispose()'. You see, I want to be sure that the complete dll is removed from memory each time, since it is called by 'objAssembly.CreateInstance'... Greetings, Sigurd

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Someone correct me if I'm wrong here: If you didn't explicitly call the Win32 API function LoadLibrary(), you can't unload it. DLL load and unload is handled automatically by the runtime (in both VB and VB.NET.) When your App loads, the runtime attempts to resolve all external references and loads the appropriate DLL's automatically. Then your app is able to call the functions you wanted. When you're done using the resources of the DLL, it WILL NOT unload. This won't happen (automatically, anyway) until your Application quits because that's when your releasing your references to the DLL. RageInTheMachine9532

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups