Link to home
Start Free TrialLog in
Avatar of R8VI
R8VI

asked on

win form close login page c#

Hi,

I have a form called Login which is my first form.

So when a user clicks btnlogin I want the Login form to close. and go to second form
Not sit in the background that is the login form

How can i do this.

Please help

Thanks,

R8VI
ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I can say open login form as dialog with two button Login and Cancel

LoginForm login = new LoginForm();
login.ShowDialog();

put DialogResult property for Login button as OK and set login button as OK button.

please refer to following article for dialog:

http://support.microsoft.com/kb/816145

and put your code in Login button click event to open your second form