One way to do this, assuming that you want to store the data from the code
for the Form itself, is to override OnLocationChanged and OnResize and then
save the location, size, etc. as needed to a defined class object. Then just
serialize the object out to an XML file in the local directory. As the Form
is created in the future it can attempt to locate and deserialize the XML
file back into an object, read the values, and restore them into the Form.
This allows you to use an XML file structure, and not the registry, and have
the Form take care of saving and restoring its own state.
--
Tim Wilson
..Net Compact Framework MVP
{cf147fdf-893d-4a88-b258-22f68a3dbc6a}
Brian said:
I am looking for a good solution to storing my dialog size and position
between instantiation. I would like the dialog to read/store/restore state
each time it is shown. In MFC I used to store the data in the user's area
of the registry, but I thought Microsoft was going away from that. Is there
a prescribed methodology for this?