[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to close the login form after successful login to show the Main form?

Posted on 2004-04-19
6
Medium Priority
?
461 Views
Last Modified: 2008-03-06

I am working in vb.net. I have a login form and after successfull login I want to close the login form and show the Mdi Main form. But my application exits after the line frmMain.show. How should i make the application running after closing the login form.

Thanks in advance.
0
Comment
Question by:vinodjnair
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 7

Expert Comment

by:leflon
ID: 10858268
Hi vinodjnair,

is the login form your startup form?
and how do you close the login form?
you may better make frmMain your startup form and open login form as the first action.

leflon
0
 
LVL 4

Expert Comment

by:venishjoe
ID: 10858345
Hai,

   You can try with the hide function and not closing

i.e.,  frmLogin.Hide
and then frmMain.show

Hope this helps

Regards
Venish
0
 

Expert Comment

by:ckiraly
ID: 10863805
hey vinodjinar -

the best way to go is to have your login form seperate from your main form.

have your main form open your login form - in modal mode is best -

then they do the login, or cancel

then you can continue on with a proper login, or close the program if they cancel the log in.

If the continue with proper login, you then just close the login form, and show your main form, then continue on with your process...

Hope this helps...

CK
0
 
LVL 3

Accepted Solution

by:
Phoenixric earned 120 total points
ID: 10925785
Hi,
Can we see the code after the success in log-in?

First thing is that your log-in form should be your star-up form.
Secondly, your form should be an independent form and the MDI child is not set to true.

And presumably after the success in log-in you have a code something like this :

if  LogInSuccess = true
    Unload me -> which unload the log-in form itself
   frmMain.show
else
   Msgbox "Access Denied"
End If

Get back to me if stil doesnt work. Good luck
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Progress
Starting up a Project

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question