Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
If we use VB, in its Application tab in Project Properties menu, we can choose the shutdown mode to "... the last form close". so in VB, the application will terminate when the last Form is closed.
How do I do that with C#? because when I closed (using syntax: this.close()) my Form1 (Form1 activates Form2), my application terminated.
What I want is,
when I start to compile, Form1 actives, then after I press Login button on Form1, Form1 closes (but NOT hide - ) then Form2 shows up.