I was dissapointed to see that the new Settings system in 2005 doesn't
appear to persist the data between application sessions. I understand that
it is used for application initialization, but there is something I read
that made me think it would work for user settings as well. Is there an
option I need to switch somewhere to get these to persist or is it back to
serializing my own options class to XML?
Thanks,
Steve 5 1390
Somewhere in your code you have to call the Save() method... e.g.
Preferences.Default.Save();
HTH
Mark
"Steve" wrote: I was dissapointed to see that the new Settings system in 2005 doesn't appear to persist the data between application sessions. I understand that it is used for application initialization, but there is something I read that made me think it would work for user settings as well. Is there an option I need to switch somewhere to get these to persist or is it back to serializing my own options class to XML?
Thanks, Steve
"StealthyMark" <St**********@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com... Somewhere in your code you have to call the Save() method... e.g. Preferences.Default.Save();
That is exactly what I was looking for, thank you! Weird this is, the docs
say that it will create a AppName.exe.config file to hold the settings (if
using the default provider) and it also says this file will be created in
teh same located as the executable that created it. Weird thing is... I
don't have that file! But the settings are saved.... so weird. A google
desktop search didn't find it either, so I don't know where that file is.
Anyway, thanks again for the post,
Steve
On Wed, 1 Mar 2006 17:01:48 -0800, Steve wrote: "StealthyMark" <St**********@discussions.microsoft.com> wrote in message news:89**********************************@microsof t.com... Somewhere in your code you have to call the Save() method... e.g. Preferences.Default.Save();
That is exactly what I was looking for, thank you! Weird this is, the docs say that it will create a AppName.exe.config file to hold the settings (if using the default provider) and it also says this file will be created in teh same located as the executable that created it. Weird thing is... I don't have that file! But the settings are saved.... so weird. A google desktop search didn't find it either, so I don't know where that file is.
I don't know how the 2005 settings system works but i would suppose that
the settings file is actually created in the user IsolatedStoarage for the
application. It would not make any sense to me to store user settings
beside the executable since users are often not allowed to write in this
folder.
Well, the *initial* (default) settings *are* read from the config file, but
afterwards the settings are persisted to either of three locations, depending
on the properties of the specific setting.
You can set the scope to User or Application, and there is an
SettingsManageability attribute, which controls whether the setting is stored
in the domain profile for the user. It cannot be set using the designer(?).
Mark
"Steve" wrote: "StealthyMark" <St**********@discussions.microsoft.com> wrote in message news:89**********************************@microsof t.com... Somewhere in your code you have to call the Save() method... e.g. Preferences.Default.Save();
That is exactly what I was looking for, thank you! Weird this is, the docs say that it will create a AppName.exe.config file to hold the settings (if using the default provider) and it also says this file will be created in teh same located as the executable that created it. Weird thing is... I don't have that file! But the settings are saved.... so weird. A google desktop search didn't find it either, so I don't know where that file is.
Anyway, thanks again for the post, Steve
Hi Mark,
I will look into the SettingsManageability attribute. I'm not sure what a
"domain profile" is, but I will learn.
Thanks for the information.
Have a great weekend!
Steve
"StealthyMark" <St**********@discussions.microsoft.com> wrote in message
news:82**********************************@microsof t.com... Well, the *initial* (default) settings *are* read from the config file, but afterwards the settings are persisted to either of three locations, depending on the properties of the specific setting. You can set the scope to User or Application, and there is an SettingsManageability attribute, which controls whether the setting is stored in the domain profile for the user. It cannot be set using the designer(?).
Mark
"Steve" wrote:
"StealthyMark" <St**********@discussions.microsoft.com> wrote in message news:89**********************************@microsof t.com... > Somewhere in your code you have to call the Save() method... e.g. > Preferences.Default.Save();
That is exactly what I was looking for, thank you! Weird this is, the docs say that it will create a AppName.exe.config file to hold the settings (if using the default provider) and it also says this file will be created in teh same located as the executable that created it. Weird thing is... I don't have that file! But the settings are saved.... so weird. A google desktop search didn't find it either, so I don't know where that file is.
Anyway, thanks again for the post, Steve
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Veeneman |
last post by:
How do I persist properties bound to application settings in the VS 2005
Designer?
I am binding form and control properties to application settings using VS
2005, as explained in MSDN:
...
|
by: Glenn Thimmes |
last post by:
I am needing to read and write application settings from within my ASP.NET
application. My web.config is not an option since I need to be able to write
settings as well. My database is not an...
|
by: Jon Slaughter |
last post by:
I wrote an app that needed to save settings such as colors, fonts, etc...
after hours of trying to use ConfigurationManager and AppSettings along with
a few other things I finally found that I...
|
by: Richard Lewis Haggard |
last post by:
I have an application that can't use the registry to save various user
options and application settings. My first thought was to simply use an
application configuration file but this approach seems...
|
by: =?Utf-8?B?UmljayBHbG9z?= |
last post by:
For some unknown reason (user error?), I cannot get a NameValueCollection to
persist in the app.config file.
Unlike other settings, I cannot get the String Collection Editor GUI to
allow my to...
|
by: Paul Hadfield |
last post by:
Hi,
I'm not having a lot of luck googling for this one, I want to be able to
store a custom class in the user settings (DotNet2.0, win app). I don't
wish to create public get / set properities...
|
by: Robert Dufour |
last post by:
Changing a setting in the UserSettings from within my app using code (Vs2005
vb.net) does not seem to persist changes to the myapp.exe.config file what
is the location and name of the file where...
|
by: =?Utf-8?B?QWFyb24=?= |
last post by:
I am trying to create dynamic settings in a .NET 2.0 C# application. I need
to be able to store settings on the user, but I do not know how many settings
are necessary at design time because the...
|
by: Steve Barnett |
last post by:
I added some user settings to my app which caused the Settings.settings to
be generated etc... and all was well and lovely and the Sun was shining.
Then I changed the version number of my...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |