Page 1 of 2

Advanced Login System

Posted: Sun Jul 11, 2010 3:32 pm
by Toby64800
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.

Re: Advanced Login System

Posted: Sun Jul 11, 2010 5:08 pm
by zachman61
this has been posted on here a lot
but
thanks anyway i dont feel like going back so far so Thanked

Re: Advanced Login System

Posted: Sun Jul 11, 2010 5:10 pm
by ManMega1
Yes, and I think I was the first to do it.

Re: Advanced Login System

Posted: Mon Jul 12, 2010 4:47 pm
by Lewis
I dont realy like login syystem that are flat file but this is great for begginers

Re: Advanced Login System

Posted: Sun Aug 01, 2010 3:19 pm
by ben49424
I think this is the best login tutorial

Re: Advanced Login System

Posted: Mon Aug 02, 2010 6:14 pm
by zachman61
i think the settings login systems prove to be more useful

Re: Advanced Login System

Posted: Wed Aug 04, 2010 11:38 am
by Agust1337
good tut, login systems are good for security :P

Re: Advanced Login System

Posted: Wed Aug 04, 2010 11:38 am
by Agust1337
good tut, login systems are good for security :P

Re: Advanced Login System

Posted: Wed Aug 04, 2010 1:38 pm
by un kn0 wn
Nice tut m8 itz small and good.

Re: Advanced Login System

Posted: Fri Aug 06, 2010 11:27 am
by bobboo
nice tut
itz wonderful for begginers