Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim pass As String
- Dim dataPass As String
- Dim readLine As New StreamReader("C:tempData1.txt")
- Dim file As String = IO.File.ReadAllText("C:tempData1.txt")
- If file = "" Then
- user =
- Button1.Text = "Save Password"
- Else : Button1.Text = "Login"
- Label1.Text = "Please Login"
- While Not readLine.EndOfStream
- Dim line1 As String = readLine.ReadLine()
- If line1.Contains("user= ") Then
- line1 = line1
- dataPass = line1
- pass = Replace(dataPass, "user= ", "")
- user = pass
- readLine.Close()
- FileClose("C:tempData1.txt")
- readLine.Close()
- Exit While
- End If
- End While
- End If
- End Sub
- passwordTwo = TextBox1.Text
- If passwordOne = passwordTwo Then
- MessageBox.Show("Password Saved")
- Label1.Text = "What Is Your Name?"
- Button1.Text = "Save Name"
- Button3.Enabled = False
- Button3.Hide()
- Button1.Enabled = True
- TextBox1.Clear()
- Dim file As StreamWriter = My.Computer.FileSystem.OpenTextFileWriter("C:tempData1.txt", True)
- file.WriteLine(passwordOne, "C:tempData1.txt")
- file.Close()
- Label1.Text = "Please Enter Name"
- Else : MessageBox.Show("Passwords Do Not Match. Please Re-Enter")
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement