Using MVSE 2012
when use this code it says the file is still inuse after it loads not exactly sure how to fix this
when use this code it says the file is still inuse after it loads not exactly sure how to fix this
Code:
Dim line1, line2, line3, line4 As String
Dim path As String = apppath & "\Settings.txt"
Dim reader As New System.IO.StreamReader(path)
line1 = reader.ReadLine
line2 = reader.ReadLine
line3 = reader.ReadLine
line4 = reader.ReadLine
reader.Close()
System.IO.File.Delete(apppath & "\Settings.txt")
My.Computer.FileSystem.WriteAllText(apppath & "\Settings.txt", line1.Text & vbCrLf, True)
System.IO.File.AppendAllText(apppath & "\Settings.txt", line2 & vbCrLf)
System.IO.File.AppendAllText(apppath & "\Settings.txt", line3 & vbCrLf)
System.IO.File.AppendAllText(apppath & "\Settings.txt", TextBox1.Text & vbCrLf)