How do I save objects values in a textfile? Particularly the backcolour of an object? This is what I have:

VB Code:
  1. Function SaveFile()
  2.         FileOpen(1, Application.StartupPath & "config.ini", OpenMode.Output)
  3.         PrintLine(1, TreeView1.BackColor)
  4.         FileClose(1)
  5.     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.