How do I ensure that all of my forms unload when I exit my main form, and make sure none of my program might still be running only hidden?


I am trying to use the form collection but is this a separate component that I have to add or what?

For i = Forms.Count – 1 to 0 Step - 1
Unload Forms(i)
Next