By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,989 Members | 1,475 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,989 IT Pros & Developers. It's quick & easy.

Saving objects to a collection for later retrieval

P: n/a
Hi I'm looking for general code examples to save a form or the
components of a form for later retrieval.

For example, lets say at runtime some controls (listview, panel,
labels) were placed onto a form.
Is there a way to save these items, their general properties (position
on the form or parent control) and to reload them later?

I'm gathering it would be a collection or container that of some sort.

Thanks.
Mike McWhinney

May 18 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mike,

Unfortunately, for windows controls, there is no easy way to do this.
Normally, you would use serialization for this, but the controls do not
support serialization.

You could ^try^ and use the XmlSerializer class to serialize the
instances, since it works by only serializing the public write properties of
a class. It might give you what you want.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"eljainc" <el*****@sbcglobal.net> wrote in message
news:11*********************@38g2000cwa.googlegrou ps.com...
Hi I'm looking for general code examples to save a form or the
components of a form for later retrieval.

For example, lets say at runtime some controls (listview, panel,
labels) were placed onto a form.
Is there a way to save these items, their general properties (position
on the form or parent control) and to reload them later?

I'm gathering it would be a collection or container that of some sort.

Thanks.
Mike McWhinney

May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.