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