J
John
Hi
I am trying to save settings of controls on my form to a file so I can read
them back later and recreate the controls on the form. I have figured out
how to go through all controls and get their properties (see code below).
What I am not sure is; how and what type of file format I need to save the
info to and how to read it back. Would appreciate any help on that. A code
snippet would be very much appreciated.
Many thanks
Regards
For Each Ctrl In rootControl.Controls
Props = TypeDescriptor.GetProperties(Ctrl)
' Write control name to a file here - how?
For Each Prop In Props
If Prop.IsBrowsable Then
PropName = Prop.Name
PropValue = Prop.GetValue(Ctrl)
' Write control properties to a file - how?
End If
Next
Next
I am trying to save settings of controls on my form to a file so I can read
them back later and recreate the controls on the form. I have figured out
how to go through all controls and get their properties (see code below).
What I am not sure is; how and what type of file format I need to save the
info to and how to read it back. Would appreciate any help on that. A code
snippet would be very much appreciated.
Many thanks
Regards
For Each Ctrl In rootControl.Controls
Props = TypeDescriptor.GetProperties(Ctrl)
' Write control name to a file here - how?
For Each Prop In Props
If Prop.IsBrowsable Then
PropName = Prop.Name
PropValue = Prop.GetValue(Ctrl)
' Write control properties to a file - how?
End If
Next
Next