I am attaching log in module in my form. I am getting problem in this because login form has to show before the other mainform so user can be authenticated. I am using VS 2005, i have two forms now
1) Login 2) MainForm
I just want to show login form before mainform and close(not hide) login form after authentication. Is there any way? Previously i worked splash screen and solved it with threads.
Is this a Windows Forms application? Could you not open a new instance of the LoginForm when the MainForm is instantiated from the main method?
You could then use the DialogResult to determine whether the user is authenticated and call Dispose() on the LoginForm afterwards.
And your login form could look like this