Code:
Private Sub Item()
Dim strWriter As New StreamWriter(FILE_NAME, False)
strWriter.Write("<Items>" & vbCrLf)
Dim arrFirst() As String = Itemsbox.Text.Split(vbNewLine)
For Each i In arrFirst
strWriter.Write("<" & i & ">" & vbCrLf)
Next
strWriter.Write("</Items>")
strWriter.Close()
Dim strReader As New StreamReader(FILE_NAME)
My.Settings.XML = strReader.ReadToEnd
strReader.Close()
MsgBox("Text Appended to the File")
End Sub
<Items> (first line)
<Info Info Info Info>
<New info new info>
<Newer Info Newer info>(so it continues to updates the list without going over </Items>)
</Items>
But this code I spent all day working at. Now I can insert multiple lines of code to the thing at once but each time I update it (press the button for Item() again) it resets and puts my <Items> and </Items> in ****ed up places or overight it completely and doesn't correctly work. Can somebody help me out here? I hope you can understand me.