473,729 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application Settings in VS2005... Anyone get this to work or knowa good site with an up--to-date tutorial?

Jim
I'm trying to use the Application Settings option in VS2005 with C#. So
far I've no success getting my settings to save or load. Various
tutorials on the 'net seem to be outdated.

Even MSDN's info seems to be incorrect regarding the act of accessing
saved settings. They say a "Settings" object is used to access them but
I have no access to such an object (It's called My.Settings in vb).

Anyone know the low-down on this? Any helpful tutorials?

Thanks for any help.
Dec 18 '05 #1
2 4618
I did something like this, but for user settings (not application since
they should be read only).

private void SaveSettings()
{
<ProjectName>.P roperties.Setti ngs userSettings = new
<ProjectName>.P roperties.Setti ngs();

userSettings.<N ameOfSetting> = "This really blows my mind!!";

userSettings.Sa ve();
}

When reading the setting, do the same as above, but read :) I found
that a user.config file gets stored in C:\Documents and
Settings\<userN ame>\Local settings\Applic ation Data\Company Name (from
assembly info?)\<Project Name>_Weird looking key

Hope this helps. I'm very new to this :)

Dec 19 '05 #2
In c# use Properties such as Properties.Sett ings.Default.Co nnectionString;
"Jim" <mr**********@y ahoo.com> wrote in message
news:uL******** ******@TK2MSFTN GP12.phx.gbl...
I'm trying to use the Application Settings option in VS2005 with C#. So
far I've no success getting my settings to save or load. Various tutorials
on the 'net seem to be outdated.

Even MSDN's info seems to be incorrect regarding the act of accessing
saved settings. They say a "Settings" object is used to access them but I
have no access to such an object (It's called My.Settings in vb).

Anyone know the low-down on this? Any helpful tutorials?

Thanks for any help.

Dec 19 '05 #3

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

Similar topics

4
1614
by: djmc | last post by:
Hi, Without using a database, what is the best way to store application settings that need to be updated by a webmaster? I would like to provide a configuration screen for the webmasters who use my asp.net application. The application does not use a database so I cannot store values there. Currently, webmasters edit the web.config file to change settings, however this application is about to be marketed towards non technical business...
1
1886
by: Cristian | last post by:
Hi I have some trouble (on only one developer computer) with the application settings functions... I have posted to the Microsoft.Public.vstudio.setup group but they couldn't help me and asked me to post in this forum. I paste both the messages I posted there.. --- Hi I have just installed VS2005 and the first thing I did was to try out the new Screensaver sample. that wouldn't work it just crashed all the time.
5
1398
by: spookyu | last post by:
Alright, I'm sure your tired to hearing this but...does anyone know of any GOOD tutorial's for learning c#. The more basic the better, I have NO experience with programing before this other than what a friend taught me (which is very little). I searched around for a while but every tutorial I found keeps reffering to things that I've never heard of. I'm no moron when it comes to basic computer skills, just I know absolutely nothing about...
6
3630
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
2
4148
by: Sin Jeong-hun | last post by:
I've read the "How to: Create Application Settings" article (http:// msdn2.microsoft.com/en-us/library/ms171565.aspx) on the MSDN. It looked fine. But this code is only good when all the settings entries are defined at the compile time. And I have to modify the class itself each and everytime I need more entries. So, is it impossible to get/ save dynamic entries? I mean, instead of, MyUserSettings.Background=color;...
0
3998
by: steve | last post by:
I am using vb.net 2005 Express Edition. Application Settings would be a very useful thing, as a global program database that persists; if only it would work! Does anyone know a hack or a work-around to get it working? For me, it seems to mess up the path of the folder where user.config is saved. If I Access the property :--
11
10144
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have seen erratic results. I am aware of one known defect where user classes do not show up in the list of types on the Property/Settings page in the visual designer and I am wondering if I am encountering some other peculiar issue, or if there are...
3
2488
by: John | last post by:
Hi Is there an easy way to allow user to change application settings at run time short of editing the configuration file manually? Thanks Regards
3
2912
by: =?Utf-8?B?RWQgQ29oZW4=?= | last post by:
I want to utilize the application settings that are provided in VS 2005 Pro AND access them via C#. The examples on line are all in VB.NET. I have looked on-line for the appropriate classes (Settings), but everything is in VB. I have not had any luck. If anyone has done this in C#.NET please post some code that does this. Thank you Ed Cohen
0
8917
marktang
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...
0
8761
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,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
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...
0
9142
tracyyun
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...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
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...
0
6022
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();...
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.