We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Login form

thenrich
thenrich asked
on
Medium Priority
223 Views
Last Modified: 2012-05-07
I've created a login form where user types in credentials. Once the credentials are validated I want to close the login form and launch another form which would be the main application thread. What is the appropriate way to do this?
Comment
Watch Question

Kyle AbrahamsSenior .Net Developer
CERTIFIED EXPERT

Commented:
In windows forms?  

You can do a Form1.Hide and Form2.show

Author

Commented:
The problem with that is that the application never closes then.

Commented:
For exit out of application use Application.Exit()

As you are Hide the for opening another form instead of hide use close form.


Commented:
Another solution is dont keep your LoginForm as main form.

Instread of that use another form as a mainform and in that load event of another form use loginform.showdialog()
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I jumped the gun - I like this idea better
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.