hi guys ,
Ive created a new login system with a "create a new account" option , but when i debug it and create a new account and then login its works fine , but when i debug it again it wont remember the account ive just created . heres my code:
Code:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 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 Me.Hide() Form2.ShowDialog() If TextBox2.Text = "" Then MsgBox("Error, PLEASE CHOOSE A PASSWORD", MsgBoxStyle.Critical) Else If PASSLINE = PASSREAD.ReadLine() = True Then End If End If Else MsgBox("THE USERNAME DONT EXIST", MsgBoxStyle.Critical) End If




Reply With Quote