473,238 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,238 software developers and data experts.

Getting to the ApplicationSettingsBase Class

Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?

dh
Nov 29 '05 #1
5 3961
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?


Are you refering to the class VS generates when you add Settings in the
project properties?

If so, the Settings class it generates is in a Properties namespace. eg, if
I create a setting called "TestBool" of type bool, I get intelliense in my
forms to type:

Properties.Settings.Default.TestBool = true;
Properties.Settings.Default.Save();

Does that help?
Nov 29 '05 #2
Additionaly, if the settings are shared across multiple prj, simply LINK the
Settings.Designer.cs of the hosting settings to the client will do.

regards
Nov 30 '05 #3
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When you
try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show me
an example?

dh

Dec 3 '05 #4
Well, I don't know why MS didn't include documentation for this where
Project Designer, Settings are described, but you can access your project's
settigns with the Settings class. You can also work with settings events by
clicking the View Code button at the top of the Settings page.

Dennis
"Dennis C. Drumm" <dc******@community.nospam> wrote in message
news:Ot******************@TK2MSFTNGP09.phx.gbl...
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When
you try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show
me an example?

dh


Dec 3 '05 #5
This is still not helpful. The only information I found in the documentation
is about creating a wrapper class the the AppSettingsBase class, which seems
like overkill if all you want to do is retrieve the settings in the user
scope. It does seem that the VB.NET documentation covers this functionality
when explaining the My.Settings class; just can't seems to find the
equivalent in the c# documentation. grrr.

"Dennis C. Drumm" wrote:
Well, I don't know why MS didn't include documentation for this where
Project Designer, Settings are described, but you can access your project's
settigns with the Settings class. You can also work with settings events by
clicking the View Code button at the top of the Settings page.

Dennis
"Dennis C. Drumm" <dc******@community.nospam> wrote in message
news:Ot******************@TK2MSFTNGP09.phx.gbl...
I was wondering the same thing! After specifiying a setting in the Project
Designer, Settings Tab, how do you access that setting using C# code?

Dennis
"Doug Handler" <dk*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to access the Settings property information? VS2k5
created this, all documentation basically only points to VB.NET. When
you try it in C#, nothing is accessible. Any thoughts - has anyone been
successful in accessing this information via code? If so, can you show
me an example?

dh



Jan 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
12
by: Sunny | last post by:
Hi All, I have a serious issue regarding classes scope and visibility. In my application, i have a class name "TextFile", and also a few other classes like "TotalWords", "TotalLines" and etc..,...
0
by: Wilfried Mestdagh | last post by:
Hi, I try to do something with ApplicationSettingsBase but after save I cannot find a config file, and it does not load eather. Probably I forget somethign but what ? Can someone check this ? I...
0
by: tomislav.bartolin | last post by:
Hi, I have inherited TaskSettings class from the ApplicationSettingsBase class and are able to get the configuration settings for this class quite nicely in my windows app. Now, if I inherit...
5
by: Mountain | last post by:
I'm working with the example code found at http://msdn2.microsoft.com/en-us/library/system.configuration.applicationsettingsbase(VS.80).aspx. I would like to implement application settings based...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
1
by: gilbert | last post by:
Hello. I am trying to work with the Settings in .NET 2.0. I have a few settings in the VS2005 generated ApplicationSettingsBase class (Properties.Settings.settings). These settings are marked...
3
by: =?Utf-8?B?ZmJvbGVmZXlzb3Q=?= | last post by:
I have a 'Filter' class that contains some strings, 1 bool and 2 Color attributes. I made an array of Filter : Filter, and I'd like to save this array with the application settings system. here...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
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...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.