Advanced Login System
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
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.
this has been posted on here a lot
but
thanks anyway i dont feel like going back so far so Thanked
but
thanks anyway i dont feel like going back so far so Thanked
Last edited by zachman61 on Sun Jul 11, 2010 5:12 pm, edited 1 time in total.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

I dont realy like login syystem that are flat file but this is great for begginers
i think the settings login systems prove to be more useful
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

good tut, login systems are good for security :P
good tut, login systems are good for security :P
Copyright Information
Copyright © Codenstuff.com 2020 - 2023