Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving form properties to XML (or some file format) 1

Status
Not open for further replies.

StrictlySocial

Programmer
Apr 27, 2007
2
GB
Hi,

First off, Apologies for my first post being a question.

Anyway, my problem is that I am creating a 'mini visual studio' which allows user to create their own forms using usual VS controls such as buttons, labels, etc.

Now what I want to be able to do is allow the users to save and load their forms half way through their development. At the moment I am using reflection to determine the properties of all the controls on the form and then documenting them in an XML file, however this could potentially take me a very long time due to the fact that I need to convert each property type into something that can be written to file (i.e. color white to RGB) and then restored back to the original type.

Does anybody know of a) an easier way than hardcoding the coversion of each property to document, or b) an open source example which will show me how to save form file, or c) an alternative method I can use to sve the existing form to file.

Thank you for your help in advance, I appreciate it greatly.
 
Thanks Ruffnekk, I meant to mention serialization as a possibility. I'll have a look through the article to see if it makes sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top