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.

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

This question has already been answered. Start a new discussion instead.