I am currently designing a system using C# winform. However, there is a problem in opening and closing multiple winform. For example, when i run the application, a login form will appear on top of the main form. The main form will only be enabled after user enter the valid username and password. When user login with a valid username and password, the login form will be close and the main form will be enabled.
Since I run the application using login form. When I close the login form, the whole application will be closed. If I hide the form then the application will still be running eventhough I closed all the forms.
Does anyone know how to solve this problem or any better recommendation?