Storing state of the form.

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
 
G

Guest

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..
 
G

Guest

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top