Advanced Login System
Posted: Sun Jul 11, 2010 3:32 pm
Hello Today Im Gona Show You How To Make A Advanced Login System:
Form1
Button1 Text: Login
Button2 Text: Sign Up
2 Textboxes
Form2
2 textboxes
Button1 Text: Create Account
Button2 Text: Cancel
Form3
Anything You Wan
Form1 Codes:
Loigin Code:
If My.Computer.FileSystem.DirectoryExists(" C:ACCOUNTS" + TextBox1.Text + "") Then
Dim USERREAD As System.IO.StreamReader = New System.IO.StreamReader("C:ACCOUNTS" + TextBox1.Text + "" + "USERNAME.TXT")
Dim userline As String
Dim PASSREAD As System.IO.StreamReader = New System.IO.StreamReader("C:ACCOUNTS" + TextBox1.Text + "" + "PASSWORD.TXT")
Dim PASSLINE As String
Do
PASSLINE = TextBox2.Text
userline = USERREAD.ReadLine
Console.WriteLine(PASSLINE)
Console.WriteLine(userline)
Loop Until userline Is Nothing
If TextBox2.Text = "" Then
MsgBox("error, PLEASE INPUT A PASSWORD", MsgBoxStyle.Critical)
Else
If PASSLINE = PASSREAD.ReadLine() = True Then
Form3.Show()
End If
End If
Else
MsgBox("THE USERNAME DONT EXIT", MsgBoxStyle.Critical)
End If
Sign Up Button:
Form2.show
Form2 Codes:
Create Account Code:
If TextBox1.Text = "" Then
MsgBox("ERROR,Your Account/Username must have one letter in it!", MsgBoxStyle.Critical)
Else
If TextBox2.Text = "" Then
MsgBox("ERROR,Your Account/Password must have one letter in it!", MsgBoxStyle.Critical)
Else
MkDir("C:ACCOUNTS" + TextBox1.Text)
Dim username As New System.IO.StreamWriter("C:ACCOUNTS" + TextBox1.Text + "" + "username.txt")
username.Write(TextBox1.Text)
username.Close()
Dim password As New System.IO.StreamWriter("C:ACCOUNTS" + TextBox1.Text + "" + "password.txt")
password.Write(TextBox2.Text)
password.Close()
MsgBox("ACCOUNT CREATED", MsgBoxStyle.Information, "ACCOUNT CREATED")
End If
End If
Cancel Button Code:
form2.close
Add Form3
For anything you want
Toby64800
The Code Wasent Made By
Me I Just Post It Here
Cuause There Isent This
Post Here. Have Fun
Building It.
Form1
Button1 Text: Login
Button2 Text: Sign Up
2 Textboxes
Form2
2 textboxes
Button1 Text: Create Account
Button2 Text: Cancel
Form3
Anything You Wan
Form1 Codes:
Loigin Code:
If My.Computer.FileSystem.DirectoryExists(" C:ACCOUNTS" + TextBox1.Text + "") Then
Dim USERREAD As System.IO.StreamReader = New System.IO.StreamReader("C:ACCOUNTS" + TextBox1.Text + "" + "USERNAME.TXT")
Dim userline As String
Dim PASSREAD As System.IO.StreamReader = New System.IO.StreamReader("C:ACCOUNTS" + TextBox1.Text + "" + "PASSWORD.TXT")
Dim PASSLINE As String
Do
PASSLINE = TextBox2.Text
userline = USERREAD.ReadLine
Console.WriteLine(PASSLINE)
Console.WriteLine(userline)
Loop Until userline Is Nothing
If TextBox2.Text = "" Then
MsgBox("error, PLEASE INPUT A PASSWORD", MsgBoxStyle.Critical)
Else
If PASSLINE = PASSREAD.ReadLine() = True Then
Form3.Show()
End If
End If
Else
MsgBox("THE USERNAME DONT EXIT", MsgBoxStyle.Critical)
End If
Sign Up Button:
Form2.show
Form2 Codes:
Create Account Code:
If TextBox1.Text = "" Then
MsgBox("ERROR,Your Account/Username must have one letter in it!", MsgBoxStyle.Critical)
Else
If TextBox2.Text = "" Then
MsgBox("ERROR,Your Account/Password must have one letter in it!", MsgBoxStyle.Critical)
Else
MkDir("C:ACCOUNTS" + TextBox1.Text)
Dim username As New System.IO.StreamWriter("C:ACCOUNTS" + TextBox1.Text + "" + "username.txt")
username.Write(TextBox1.Text)
username.Close()
Dim password As New System.IO.StreamWriter("C:ACCOUNTS" + TextBox1.Text + "" + "password.txt")
password.Write(TextBox2.Text)
password.Close()
MsgBox("ACCOUNT CREATED", MsgBoxStyle.Information, "ACCOUNT CREATED")
End If
End If
Cancel Button Code:
form2.close
Add Form3
For anything you want
Toby64800
The Code Wasent Made By
Me I Just Post It Here
Cuause There Isent This
Post Here. Have Fun
Building It.