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. Close ALL forms

Close ALL forms

Scheduled Pinned Locked Moved Visual Basic
questionperformance
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.
  • B Offline
    B Offline
    Brad Fackrell
    wrote on last edited by
    #1

    How can I make sure that ALL forms in an application close when the user exits the program? My application consists of multiple forms and I use form.hide() which (I think) is leaving any previously viewed form in memory. On the Exit command I use Application.Exit()but I don’t think that all forms are being cleared from memory and the computer still thinks that my application is running. Thanks Brad

    D 1 Reply Last reply
    0
    • B Brad Fackrell

      How can I make sure that ALL forms in an application close when the user exits the program? My application consists of multiple forms and I use form.hide() which (I think) is leaving any previously viewed form in memory. On the Exit command I use Application.Exit()but I don’t think that all forms are being cleared from memory and the computer still thinks that my application is running. Thanks Brad

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

      Brad Fackrell wrote: On the Exit command I use Application.Exit()but I don’t think that all forms are being cleared from memory and the computer still thinks that my application is running. Not true. All the managed objects you create are destroyed when the startup form is destroyed. The problem comes in when you don't release unmanaged resources, like file handles, GDI handles, various COM objects, ... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      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