Hello, on my application i have a username and password form that saves the username & password
It's not meant to be secure, and it writes to a text file displaying as so
here is the code
This all works fine, but i have no idea how to reload this information when the form loads.
Obviously it needs to read the string, the seperate the username and password.
i have been trying for hours
also is it possible to password char the password section in the listview? at the moment it can be read.
thanks
It's not meant to be secure, and it writes to a text file displaying as so
VB.NET:
Johnson:password1
Newname:password2
Newname2:password3
here is the code
VB.NET:
Private Sub cmdPostAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPostAdd.Click
'Add new username and password
If txtPostName.Text <> "" And txtPostValue.Text <> "" Then
Dim liNew As ListViewItem = lvPost.Items.Add(txtPostName.Text)
liNew.SubItems.Add(txtPostValue.Text)
txtPostName.Text = ""
txtPostValue.Text = ""
Dim i As Integer = 0
Dim sTemp As String = ""
' Write All Items and subitems to a file
With lvPost
.View = View.Details
For i = 0 To .Items.Count - 1
' Collect Item and subitems as comma separated elements
' sTemp += .Items(i).Text & ","
sTemp += .Items(i).SubItems(0).Text & ":"
sTemp += .Items(i).SubItems(1).Text & vbNewLine
Next
End With
My.Computer.FileSystem.WriteAllText("C:\UIS.txt", sTemp, False)
End If
End Sub
This all works fine, but i have no idea how to reload this information when the form loads.
Obviously it needs to read the string, the seperate the username and password.
i have been trying for hours
also is it possible to password char the password section in the listview? at the moment it can be read.
thanks