I have a question on memory management within Visual Studio using Visual Basic.
I have a form with a button. When the button is pressed a second form that I have created appears. I am using the code below to show the second form:
Form2.show()
My question is: When I press the button in the first form , is the second form loaded into memory, or has it been loaded from the start of the program, but just hidden?
Is there a way to unload the form after it has been loaded, so that it doesn't take up memory anymore?
Use Unload Form2 to unload the form from memory. The show method simply shows the already memory loaded form.
Load Form2 is used to load the form into memory. But Form2.Showis only used to show it for the user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With