Solved

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

Posted on 2004-04-19
6
430 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
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 30 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 92
How to split this in C++ 4 103
firstswap challenge 20 78
VBSCRIPT string remove all characters to the right after extension 4 63
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

831 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