VB 2010 Login Source Code!

Posts 1–10 of 10 · Page 1 of 1
VB 2010 Login Source Code!
SOURCE:

[highlight=vb.net]
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = My.Settings.username
TextBox2.Text = My.Settings.password
If TextBox1.Text = "" Then
Else
CheckBox1.Checked = True
End If
If TextBox2.Text = "" Then
Else
CheckBox2.Checked = True
End If
End Sub
[/highlight]
[highlight=vb.net]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "username" And TextBox2.Text = "password" Then
If CheckBox1.Checked = True Then
My.Settings.username = TextBox1.Text
My.Settings.Save()
My.Settings.Reload()
Else
My.Settings.username = ""
My.Settings.Save()
My.Settings.Reload()
End If
If CheckBox2.Checked = True Then
My.Settings.password = TextBox2.Text
My.Settings.Save()
My.Settings.Reload()
Else
My.Settings.password = ""
My.Settings.Save()
My.Settings.Reload()
End If
MsgBox("You Have Successfully been logged into the secret system ", MsgBoxStyle.Information, "Login Successful")
Else
MsgBox("ERROR: INCORRECT USERNAME/PASSWORD!", MsgBoxStyle.Critical, "FAILURE!")
End If
End Sub
[/highlight]

[highlight=vb.net]
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
[/highlight]
[highlight=vb.net]
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = False Then
CheckBox2.Enabled = False
CheckBox2.Checked = False
Else
CheckBox2.Enabled = True
End If
End Sub
End Class
[/highlight]

Please Thank me !
Well good tutorial but I think login systems with DB are cooler
nice tutorial but very simple
No explanation of setting up the MySettings.
Unclean sourcecode.
No VB code tags.

Meh.
Don't you have to set up strings? And what's up with the shiity checkbox codes at bottom there's no need really. Oh and shiity tut where's the pictures on how the form looks? No thanks from me!
I like the settings part
Nice release but im pretty sure there is already this kind of tut.
Code:
if (textbox1.text = "Hello World") then
if(textbox1.text = "Password") then
form2.show()
end if
end if
Added code tags, please use them in future. The tutorial itself was pretty crap, no explanation on anything that was going on. The method itself is pretty poor too, and is easy to crack. Work more on any future tutorials you may release.
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us