Saving object values in a textfile.
How do I save objects values in a textfile? Particularly the backcolour of an object? This is what I have:
VB Code:
Function SaveFile()
FileOpen(1, Application.StartupPath & "config.ini", OpenMode.Output)
PrintLine(1, TreeView1.BackColor)
FileClose(1)
End Function
But it's throwing an exception:
-------------------------------------------------------------------
An unhandled exception of type 'System.ArgumentException' occurred in microsoft.visualbasic.dll
Additional information: File I/O with type 'Color' is not valid.
-----------------------------------------------------------------------
Any help on how to save objects values in a textfile?
Thanks.