this is interesting again, i have been trying this for the past 6 hours without zero progress..
So my question does vb have this at all, becaus eI searched & I cant find nothing that i can make to work at all?
basically i have a listbox & i want to save all listbox items into txt file so i can load them back again lather. well this is what i have & its not really working:Code:filewriteline(filename,"text",linenr) filereadline (filename,"text",linenr)
this is how I load items from txt file to listbox But sometimes its working(putting item on next listbox line) & sometimes not its like magic really..:
& this is how I write the listbox items to file:Code:Dim file_name As String = load_listbox Dim stream_reader As New IO.StreamReader(file_name) ListBox1_include.Items.AddRange(Split(stream_reader.ReadToEnd, _ vbCrLf)) ListBox1_include.SelectedIndex = 0 stream_reader.Close()
Code:' For nr = 1 To ListBox1_include.Items.Count - 1 ' 'write all items into txt file ' My.Computer.FileSystem.WriteAllText(links_include, ListBox1_include.Items.Item(nr) & Chr(13), True) ' Next





Reply With Quote