saving state

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

I would like to save the state of a set of controls, their child controls
and data values when I exit the program. Then be able to restore the state
when I open the program. What is the best way of doing this.
Thanks,
Rick
 
Rick said:
I would like to save the state of a set of controls, their child
controls and data values when I exit the program. Then be able to
restore the state when I open the program. What is the best way of
doing this.

Hi Rick,
you should look up Serialization & the [Serializable] attribute.

Barry Mossman
 
Thanks for Barry's quick response.

Hi Rick,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to save the state of each
control and its child control on a form. If there is any misunderstanding,
please feel free to let me know.

Just as Barry mentioned, we can use implement the ISerializable interface
and the Serializable attributes to achieve this. You can try to check the
following link for more information.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/ht
ml/vbnet09252001.asp

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Thanks,

The link didn't work, but I did see where there is discussion of the
ISerializable interface in MSDN. In previewing the info, it looks like what
I'm looking for. I'll look it over.

If there are any good sample apps implementing this
behaviour that you know of, I'd like a link to those too.

Thanks,
Rick
 
Rick said:
The link didn't work, but I did see where there is discussion of the
ISerializable interface in MSDN. In previewing the info, it looks like
what I'm looking for. I'll look it over.

Kevin's link works if you take care of the line wrapping. Here is a
smaller version of the same url:
http://tinyurl.com/52akh

The example code is in VB though.

Barry Mossman
 
Back
Top