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 5 3996
"Doug Handler" <dk*******@yaho o.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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.Sett ings.Default.Te stBool = true;
Properties.Sett ings.Default.Sa ve();
Does that help?
Additionaly, if the settings are shared across multiple prj, simply LINK the
Settings.Design er.cs of the hosting settings to the client will do.
regards
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*******@yaho o.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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
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******@commu nity.nospam> wrote in message
news:Ot******** **********@TK2M SFTNGP09.phx.gb l... 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*******@yaho o.com> wrote in message news:%2******** ********@TK2MSF TNGP12.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
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******@commu nity.nospam> wrote in message news:Ot******** **********@TK2M SFTNGP09.phx.gb l...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*******@yaho o.com> wrote in message news:%2******** ********@TK2MSF TNGP12.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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 a type mismatch.
It is positively because of the boolean(java primitive)parameter. It
goes fine if I change this parameter to int or String.
This inteface has a lot more methods which works fine, it is just the
|
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.., which are
suppose to describe the structure of my main TextFile
class. Also i have created some custom collection classes,
which only take items of the types, they are designed for.
Now the problem is that I want my element classes,
like...
|
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 assume (according to the help) that
after clicking button2 I have a config file in application's folder, but I
have not.
Also I get an exception error if using . Wy ? There is
some explanation of this in the help, but (my poor) english does not
|
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 further from the TaskSettings class and create a
ServerTaskSettings inherited class, the settings for the properties
defined in the TaskSettings class from the TaskSettings section in the
app.config are not applied to instances of the...
|
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 on some custom types.
For example, let's say I have a collection of settings that I could represent
similar to this code:
public class MyItem
{
| |
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 follows:
The code below is for the first page:session_start is in line 3
<link href="css/jobSheet.css" rel="stylesheet" type="text/css" />
session_start();
|
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 (NT_AUTHORITY\SYSTEM).
I understand that when the service starts, no user may be logged in, but
that's ok, as the app I am monitoring can only be run by a logged in user.
Do I need to use WMI to get the user context of Explorer.exe or is there a...
|
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 as
user scope. I would like to share those user-defined settings between
machines (The domain is not set for user roaming). Is there any way to
save the config file to a directory and open it when the program
starts to load? Thanks.
|
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 is my ApplicationSettingsBase-derived class :
public Filter filtersList
{
get{return ((Filter)(this)); }
set{ this = value; }
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |