vb 2005 and simple way to wright listview and all its propities to file

vb 2005 and simple way to wright listview and all its propities to file

Post by John » Wed, 05 Mar 2008 21:09:08


Hi not sure were to post this but would appreciate if someone knows
simple answer...... which usually never exists



hi have added all my items subites and colors etc to my listview1 in
vb 2005


is there a simple way to save the whole object to file
instead of iterating though each property


such as


Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing


FileSystem.FileOpen(1, "j:\test\lvobj.txt", OpenMode.Output,
OpenAccess.Write, OpenShare.Shared)

Write(1, obj.ToString)

FileClose(1)

End Sub


then read it in at program start

dim the file as an listview1
and it would have all items and subitems and colors, you know
something simple



PS isn't there something magical like saveobj(.....................)
I know dreaming

thanks in advance