Well let me start out by saying im new to vb.net so bare with me...
I am curious how to do the following:
When program is opened, goes directly to frm_login
When password and username are correct goes to frm_main (this is the main window)
What i am doing wright now is this:
When program is opened:
Frm_Main is called...
sub frm_Main_Load
Dim Formlogin As New frm_Login()
If loginVerified = false then
formLogin.Show()
counter_login.Enabled = True
end sub
sub Counter_Login_Elasped
Me.Visible = False
end sub
Once Frm_Main is called it goes directly to frm_Login... I had to use the counter in order to do this because for whatever reason the main form kept staying visible.
frm_Login
Sub ButtonClick
Dim FormMain as New Frm_Main
If tbx_user.text = "Username" And tbx_password.Text = "Password" Then
LoginVerified = True
FormMain.visible = true
Me.Close()
else
msgbox("Username or Password is incorrect")
end if
end sub
My problem right now is whenever i run the app it closes and goes through right, but when i go to close the main window after logging in it doesn't close the application.
I believe this is because i am declaring FormMain as a "NEW" form vs using the current form that is invisable.... What can i do to correct this problem???
Also what could i do to not have to use the timer to get the frm_Main form to close?
Thanks!!!
I am curious how to do the following:
When program is opened, goes directly to frm_login
When password and username are correct goes to frm_main (this is the main window)
What i am doing wright now is this:
When program is opened:
Frm_Main is called...
sub frm_Main_Load
Dim Formlogin As New frm_Login()
If loginVerified = false then
formLogin.Show()
counter_login.Enabled = True
end sub
sub Counter_Login_Elasped
Me.Visible = False
end sub
Once Frm_Main is called it goes directly to frm_Login... I had to use the counter in order to do this because for whatever reason the main form kept staying visible.
frm_Login
Sub ButtonClick
Dim FormMain as New Frm_Main
If tbx_user.text = "Username" And tbx_password.Text = "Password" Then
LoginVerified = True
FormMain.visible = true
Me.Close()
else
msgbox("Username or Password is incorrect")
end if
end sub
My problem right now is whenever i run the app it closes and goes through right, but when i go to close the main window after logging in it doesn't close the application.
I believe this is because i am declaring FormMain as a "NEW" form vs using the current form that is invisable.... What can i do to correct this problem???
Also what could i do to not have to use the timer to get the frm_Main form to close?
Thanks!!!