Reputation: 3
I am making an application in vb.net and contains many forms. The problem is this: Suppose Form1 is the father, and from the open Form2
Form2.show()
Me.close()
Then the Form2 opens or displays the Form1 and Form2 closes.
Form1.show()
Me.close()
But in doing so the application cops, but Form1 appears blank and the application is not responding. I hope you can help me with the management of the windows, thanks.
Upvotes: 0
Views: 83
Reputation: 39142
In Project --> Properties, change the "Shutdown mode:" dropdown to "When last form closes". Now the application won't close when Form1 is closed (assuming you've already opened Form2). As long as you have an open Form, the app will stay open. This way you can freely switch between any number of Forms as often as you like...
Upvotes: 2