I am having a difficulty in this login form that I have made.
The same as the premade template login in VB 2008 which I am using right now.

Here's what happens when I run the program
Log in form open > Log in successful > Main window appears
*The login form still does not disappear.

I tried hiding it via

me.hide(

)
Log in form open > log in successful > Main window appears > log in form disappear.
*Now the problem is that I cant close the whole application because the login form is still there only hidden.

Again I tried putting in the "EXIT" button the code

me.close() login.close()

Log in form open > log in successful > Main window appears > log in form disappears > Exit application
*Now everything seems to be ok now and then I found another problem.
Instead of clicking the exit button I tried clicking the X button on the main window. There I found out that it only closes the main window. Therefore not closing the whole application because the login form is still hidden.

O_O I know, I'm stupid but please any help would be greatly appreciated.

Recommended Answers

All 2 Replies

You need to do application.exit() if u want to triminate entire application in the main form close event..

Ohhh thank you! ^^ I got it fixed now! hehe
Thanks for the quick reply. :3

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.