Storing state of the form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I want to store the state and value of all the controls of all the opended forms while closing the application, so that once the application restarts i will be able to show the user the same state of the applicaition as it was last closed.Is there any way to implement it
Regards
 
There are no shortcuts to achieve your end..
If your interface is databound, perhaps storing the data object in serialized form to your hard disk is an option.
For a non-data bound Windows Form and controls, you will have to invoke a custom routine of your own to store the state of each control to the harddrive (xml format is suggested). This routine can be called in the Forms Closing event. Again on load, you check the availablility of any concerned data in your storage file and pump it into your interface.. i think you get the idea..
 
Thanks Jaison for your reply, the idea given by you is good. If there is no shortcut i have to go by this way only.
 
All the best!! It would be interesting to know what you actually decide to do...fill us in when you are through with an implementation.
 
Back
Top