In your config file,specify the name of a seperate settings file (or use a
default name). If the app is run by multiple users, and they each need
their own settings, make sure you store the settings file in their local
"Documents and Settings" folder, and not in the app directory.
Have your app deserialize the setting file when you start up, and
reserialize it when you shut down. XML of course.
Let the config file be application config, not user settings. Most .NET
apps do this or a form of this for storing settings, rather than changing
the config file itself.
--- Nick
"MrXs" <Mr******@hotma il-dot-com.no-spam.invalid> wrote in message
news:41******** **@Usenet.com.. .
i have a setting form for my program and wish to allow the setting to
be saved and reopened to the last set setting on program startup..
lets say i have a xml file like this :
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings>
<add key="test" value="My Test String"
/>
</appSettings>
</configuration>
[code:1:9a6bbbbe ac]
private void button1_Click(o bject sender, System.EventArg s e)
{
//here i put what code ??
}
[/code:1:9a6bbbbe ac]
how do a get the app to save any new settings to this xml file and
also how do i load the setting on program startup ?
Thanks
MrXs