I'm having a bit of a brain fart. I think there is something small that I'm missing yet need help.
So.. pretty simple scenario:
Windows form app, Login window, which should be closed once user is authorized and the actual MDI application is presented.
I modified the Program.cs file for the Login form to be displayed before the main application comes up ( code below ).
The authentication works but the Login form doesn't go away unless I close it separately. The only way it works right now If I authenticate and then close the form by hitting the Cancel button.
Any suggestions ?
Thank you in advance.
static class Program
/// The main entry point for the application.
static void Main()
Login userLogin = new Login();
while (!userLogin.UserIsAuthenticated && userLogin.LoginAttempts<3)
if (userLogin.ShowDialog() == DialogResult.Cancel)