How do I serialize and deserialize my main form (and its controls, subcontrols, their values, etc.)?
Edit, for clarification. Currently I am writing the current value of each control to an .INI file, one by one and reading it back when the program is next run. Every time I add a new control, I have to remember to update that save/load .INI code.
I just wondered if I can do it in one call, or a simple for loop iterating over all controls on the form.
Btw, I use only simple controls like edit box, radio button, combo box, checkd listbox, the most complex thing I have is a datagrid, but even that is not linked to a databse.
Accepted answer "can't. I will probably code my own, along the lines of ...
for each child control (recursivley)
if conrol is editbox ...
if control is radiobutton ...
if ... etc
write control name to .ini file
write control "value" to .ini file
maybe later add left/top/height/width/enabled/visible, etc, bu tfor not th econtrol name an its "value" are enough (text, value, lines, checked?, etc)