help with login system

Posts 1–13 of 13 · Page 1 of 1
help with login system
hello, i am making a simple login system and i require some assistance.



on the login page -

if you do not enter anything in user/pass an error will come saying
invalid user / pass, but then form2 comes up how can i stop this.


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then MsgBox("Incorrect Username!")
If TextBox2.Text = "" Then MsgBox("Incorrect Password!")
Form2.Show()
End Sub
End Class


here this is my code, i want it so when u enter the WRONG information form2 will not show, atm if i dont type anything in errors come but form 2 after



if you do not enter correct info i wish form2 would not show
but if u enter anything or not it still shows
if u dont want form2 to show y do u got
If TextBox1.Text = ""
Then MsgBox("Incorrect Username!")
If TextBox2.Text = ""
Then MsgBox("Incorrect Password!")
Form2.Show()
End Sub
get rid of form2.show
Quote Originally Posted by pushdis15 View Post
if u dont want form2 to show y do u got
If TextBox1.Text = ""
Then MsgBox("Incorrect Username!")
If TextBox2.Text = ""
Then MsgBox("Incorrect Password!")
Form2.Show()
End Sub
get rid of form2.show

I know but,
If they get the info write i want form2 to show, so where would i write form2 show
try this
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            MsgBox("not vaild")
            If TextBox2.Text = "" Then
                MsgBox("not vaild")
            Else
                Form3.Show()
            End If
        End If
    End Sub
Quote Originally Posted by pushdis15 View Post
try this
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then
            MsgBox("not vaild")
            If TextBox2.Text = "" Then
                MsgBox("not vaild")
            Else
                Form3.Show()
            End If
        End If
    End Sub
tried it i did this

i left username blank
i left password blank

pressed login, and form 2 did not show or nothing happend
Quote Originally Posted by Connorcide View Post
tried it i did this

i left username blank
i left password blank

pressed login, and form 2 did not show or nothing happend
is that wat u wanted?
if not send me a pm and i will help u more.
Code:
If textbox1.Text <> "" then
if textbox2.text <> "" then
form2.show
'do events
else
msgbox("Invalid password")
end if
else
msgbox("Invalid Username")
End if
Maybe this?
Quote Originally Posted by Blendsoft View Post
Code:
If textbox1.Text <> "" then
if textbox2.text <> "" then
form2.show
'do events
else
msgbox("Invalid password")
end if
else
msgbox("Invalid Username")
End if
Maybe this?
testing ur method now

Quote Originally Posted by Blendsoft View Post
Code:
If textbox1.Text <> "" then
if textbox2.text <> "" then
form2.show
'do events
else
msgbox("Invalid password")
end if
else
msgbox("Invalid Username")
End if
Maybe this?
thanks it works!
Quote Originally Posted by Blendsoft View Post
@Connorcide Could u press Thanks button if you dont mind?
btw do u no how to make a register for the simple login, like whats codes


i thanked
Quote Originally Posted by Connorcide View Post
btw do u no how to make a register for the simple login, like whats codes


i thanked
You will need a WebBrowser control for that. It can be hidden so it navigates to desired register page and then you can use webbrowser.document function to edit textboxes on website by their id or name.


EDIT: If we are talking about website account creation.
Quote Originally Posted by Blendsoft View Post


You will need a WebBrowser control for that. It can be hidden so it navigates to desired register page and then you can use webbrowser.document function to edit textboxes on website by their id or name.


EDIT: If we are talking about website account creation.
well no i dont think he wants somethen like that i think he wants one where they can register on the login hes making and just save them settings ? for them to login idk i could be wrong.
Look's like you're making a SMTP logger.
Quote Originally Posted by IHaxYou! View Post
Look's like you're making a SMTP logger.
Nah it's not buddy.

Quote Originally Posted by IHaxYou! View Post
Look's like you're making a SMTP logger.
Nah it's not buddy.
Posts 1–13 of 13 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us