>When I create aplication settings using the settings editor, they are
>read only. So how can I update them? :)
>
>BTW, why they are read-only?
Eric,
Which Version of .NET are you using?
In .NET 1.x MS thought it was a good idea not to provide a simple way
to update the Config files without using the DOM, but... not many of
us liked that.
In .NET 2.0 you should be able to read and write to the config file.
Can you post the error you are seeing?
Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Erick Sasse - 14 Feb 2006 10:54 GMT
> Which Version of .NET are you using?
2.0
> In .NET 2.0 you should be able to read and write to the config file.
> Can you post the error you are seeing?
Error 8 Property or indexer
'WindowsApplication1.Properties.Settings.Teste' cannot be assigned to
-- it is read only

Signature
Erick Sasse
Otis Mukinfus - 14 Feb 2006 11:46 GMT
>> Which Version of .NET are you using?
>
[quoted text clipped - 6 lines]
>'WindowsApplication1.Properties.Settings.Teste' cannot be assigned to
>-- it is read only
Hmm.. Sorry, but would you mind posting the code you are using to set
the value?
Thanks,
Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
Erick Sasse - 14 Feb 2006 12:48 GMT
> Hmm.. Sorry, but would you mind posting the code you are using to set
> the value?
No problem. :)
Properties.Settings.Default.Teste = textBox1.Text;
If you take a look at this article, the author talk about application
settings being read-only:
http://msdn.microsoft.com/msdnmag/issues/06/00/SmartClients/

Signature
Erick Sasse
Change setting type (aka Scope) from "Application" to "User" in the
settings editor for each object you need to have write access. With
Scope set to Application, those objects will be readonly.
Erick Sasse - 14 Feb 2006 14:07 GMT
> Change setting type (aka Scope) from "Application" to "User" in the
> settings editor for each object you need to have write access. With
> Scope set to Application, those objects will be readonly.
Ok, but then if a user updates a setting it don't propagate to other
users, right?
I want to have app settings that a user can update. What's the best
approach?
Thanks!

Signature
Erick Sasse
Mike Edgewood - 14 Feb 2006 14:52 GMT
Correct. It is stored locally. Just don't ask me where or what file.
Add a method for setting the value on demand (btnClick) or on exit
(formclosing)
If SaveMySettingsOnExit = True, you will not need to call
MySettings.Save as it will happen automatically on every form close.
You will, however, need to set the values.
To propagate user settigns on form close, set your variables that you
want to propagate to the next session in the formclosing event.
ie. MySettings.SettingStr1 = Me.TextBox1.Text