Home All Groups Group Topic Archive Search About

How to update application settings in vb.net code

Author
19 Jun 2006 10:23 PM
Bob
The my.settings name space is easy to use to modify User settings from
within code, but the application settings can't seem to be modified that
easily.
I want the user to be able to modify some of the application setting ( like
my connection strings) through a friendly user interface on one of my forms,
without having to go in the .config file with notepad. If its in my code I
can do testing and validating when he chages things.

Any help appreciated

Bob

Author
20 Jun 2006 3:27 AM
Ahmed
Hi,

If you go to the project properties and click the settings tab, you can
define my.settings settings. In the scope column you can specify if the
setting is an application or user setting.

I have never tried the above solution, but I remember reading it
somewhere in msdn.

Cheers,
Ahmed
Bob wrote:
Show quoteHide quote
> The my.settings name space is easy to use to modify User settings from
> within code, but the application settings can't seem to be modified that
> easily.
> I want the user to be able to modify some of the application setting ( like
> my connection strings) through a friendly user interface on one of my forms,
> without having to go in the .config file with notepad. If its in my code I
> can do testing and validating when he chages things.
>
> Any help appreciated
>
> Bob
Author
21 Jun 2006 2:25 AM
Bob
Thanks, I know that, the problem is that if you scope the settings to
application, you can't modify them from within code, they seem to be read
only and you can only access them via notepas in te app.config file when you
distribute the application.

Since when I distribute my application, duing its lifecycle, things like
connection strings are liable to change, I want to give the user the ability
to configure these and other settings from within the app. Its easy to do if
you use user scoped settings, but that means that if another user logs in
and uses the same app, you have to configure it per user.

I want to be able to modify application scope settings. I had developped
code to do that in vb.net 2003 but now I,m using 2005 and I wanted to find
out if there was y built-in way to do that.

If not, I,ll stick with the user scoped settings.

Bob
Show quoteHide quote
"Ahmed" <ahmed1***@gmail.com> wrote in message
news:1150774054.871981.319110@r2g2000cwb.googlegroups.com...
> Hi,
>
> If you go to the project properties and click the settings tab, you can
> define my.settings settings. In the scope column you can specify if the
> setting is an application or user setting.
>
> I have never tried the above solution, but I remember reading it
> somewhere in msdn.
>
> Cheers,
> Ahmed
> Bob wrote:
>> The my.settings name space is easy to use to modify User settings from
>> within code, but the application settings can't seem to be modified that
>> easily.
>> I want the user to be able to modify some of the application setting (
>> like
>> my connection strings) through a friendly user interface on one of my
>> forms,
>> without having to go in the .config file with notepad. If its in my code
>> I
>> can do testing and validating when he chages things.
>>
>> Any help appreciated
>>
>> Bob
>