hi i am facing overwriting file in window mobile 6 professional.
bellow are my code.
when the system start loading:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim line As String
Dim Lat As StreamReader = New StreamReader("\Program Files\please_must_be_ok\Resources\contact1.txt")
line = Lat.ReadToEnd()
TextBox1.Text = line
Lat.Close()
End Sub
the system will automatic load the file contact1.txt contact number to TextBox1.Text
if the user want to change the contact display at TextBox1.Text, the user required key the new contact number at TextBox1.Text, then click the Button1 to save the contact number to file "contact1.text"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Lat As StreamWriter = New StreamWriter("\Program Files\please_must_be_ok\Resources\contact1.txt")
Lat.WriteLine(TextBox1.Text)
Lat.Close()
End Sub
my problem now is, i can't overwrite the contact number in file "contact1.txt"
kindly advice, how can i overwrite the "contact1.txt" file in window mobile 6 professional.
thank a lot