Persisting GUI's

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Howdy

I need to port a VB6 app. Its GUI is persisted to an .ini file - ie all the
control captions, positions, whether visible, tooltips, that kind of thing.

In C# is there an easier way to accomplish this? I tried to Serialize a
button without much luck, and further googling leads me to believe that you
need to write a wrapper object and serialize the wrapper.

I'm looking for ideas on how to do this. Be grateful for any bright ideas
....

Mike
 
Serialization is one method, but in case you don't have much customizable
elements you could store the values in an XML file, from which you read @
runtime and set the values. Reflection would easily help you do that.

And in case you have only a few elements, then you could store their values
in app.config, instead of a full fledged XML file.
 
mike
Howdy

I need to port a VB6 app. Its GUI is persisted to an .ini file - ie all the
control captions, positions, whether visible, tooltips, that kind of thing.

In C# is there an easier way to accomplish this? I tried to Serialize a
button without much luck, and further googling leads me to believe that you
need to write a wrapper object and serialize the wrapper.

I'm looking for ideas on how to do this. Be grateful for any bright ideas
...

You can check out this article posted on codeproject:

http://www.codeproject.com/useritems/PersistWindowState.asp

hope it helps...
 

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

Back
Top