Re: Login System (No MySql Etc)
Posted: Thu Apr 22, 2010 11:03 pm
i know it is i tried capital and lower case, i just took the pic with the capitals cause thats what i had on it.
Sharing, Teaching and Supporting coders of all ages and levels since 2009
https://www.codenstuff.com/forum/
If My.Computer.FileSystem.DirectoryExists("C:\LoginInfo\") Then
Else
MkDir("C:\LoginInfo\")
End If
If My.Computer.FileSystem.DirectoryExists("C:\LoginInfo\" + TextBox1.Text.ToLower) Then
MsgBox("Error - account already exists", MsgBoxStyle.Critical)
Else
MkDir("C:\LoginInfo\" + TextBox1.Text.ToLower)
Dim a As New System.IO.StreamWriter("C:\LoginInfo\" + TextBox1.Text.ToLower + "\Username.txt")
a.WriteLine(TextBox1.Text.ToLower)
a.Close()
Dim b As New System.IO.StreamWriter("C:\LoginInfo\" + TextBox1.Text.ToLower + "\Password.txt")
b.WriteLine(TextBox2.Text.ToLower)
b.Close()
MsgBox("Account created")
End If
Try
Dim sa As String
Dim sb As String
Dim a As New System.IO.StreamReader("C:\LoginInfo\" + TextBox4.Text.ToLower + "\Username.txt")
sa = a.ReadLine()
a.Close()
Dim b As New System.IO.StreamReader("C:\LoginInfo\" + TextBox3.Text.ToLower + "\Password.txt")
sb = b.ReadLine()
b.Close()
If TextBox4.Text.ToLower = sa.ToString Then
If TextBox3.Text.ToLower = sb.ToString Then
MsgBox("Welcome " + sa.ToString)
Form2.Show()
Else
MsgBox("Error - password incorrect")
End If
Else
MsgBox("Error - account does not exist")
End If
Catch ex As Exception
MsgBox("Error - " + ex.Message)
End Try