Home All Groups Group Topic Archive Search About

Need help Saving User changes to a form please

Author
24 Nov 2006 12:18 PM
Marc
Hi,  I have a form that allows the user to add extra buttons if
required..How can i save these extra buttons to the application after
the program is closed?

Thanks

Marc

Author
27 Nov 2006 1:50 PM
Phill W.
Marc wrote:

> Hi,  I have a form that allows the user to add extra buttons if
> required..How can i save these extra buttons to the application after
> the program is closed?

You'll need to have references to these controls as they are added at
run-time so loop through them and write out /enough/ information to
recreate them when you next run the program.  Name, Location, Size, Text
ought to be a good start.

Choose your favourite file format - XML, Ini, plain, old-fashioned text;
whatever suits you best.

Regards,
    Phill  W.
Author
27 Nov 2006 2:16 PM
Michel van den Berg
You might want to implement something like this:
http://www.ondotnet.com/pub/a/dotnet/2002/09/09/memento.html

Depending on your needs, it could be wiser to do it differently.

Phill W. schreef:

Show quoteHide quote
> Marc wrote:
>
> > Hi,  I have a form that allows the user to add extra buttons if
> > required..How can i save these extra buttons to the application after
> > the program is closed?
>
> You'll need to have references to these controls as they are added at
> run-time so loop through them and write out /enough/ information to
> recreate them when you next run the program.  Name, Location, Size, Text
> ought to be a good start.
>
> Choose your favourite file format - XML, Ini, plain, old-fashioned text;
> whatever suits you best.
>
> Regards,
>     Phill  W.