saving listbox

ukjock

Active member
Joined
Dec 10, 2003
Messages
35
Location
Scotland
I am currently writing to a text file, but everytime I write to the file it adds the recent information to the bottom of the file, and I need the recently saved information to stay to the top of the file.

So i came up with the idea of writing the information to a listbox and then save the list box, with the following code:

Code:
dim callh as new caller_history
            callh.ListBox1.Items.Clear()
            callh.ListBox1.Items.Add(Format(Now, "dd/MM/yyyy   |   HH:MM") & "   |   " & TextBox3.Text & " |   Saved from listbox")
            CallHistory.Write(callh.ListBox1)
            CallHistory.Close()

My forst problem is I get this when I look at the file:

System.Windows.Forms.ListBox, Items.Count: 1, Items[0]: 30/12/2003 | 13:12 | Thinks pres

I need to get rid of :

System.Windows.Forms.ListBox, Items.Count: 1, Items[0]:

Any ideas on where this text is being produced?

regards

Chris
 
Back
Top