473,379 Members | 1,187 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,379 software developers and data experts.

My.Settings

Fox
NewBie question.

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).
Mar 20 '06 #1
5 4031
Fox,

I would assume you are using the Windows Application Framework, if so, then
you might find this is not available in c# currently.

Regards
Scott Blood
"Fox" <sdasd> wrote in message news:uR**************@TK2MSFTNGP10.phx.gbl...
NewBie question.

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).

Mar 20 '06 #2
Fox
OIC Thank.
"scott blood" <sc*********@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:u4**************@TK2MSFTNGP10.phx.g bl...
Fox,

I would assume you are using the Windows Application Framework, if so,
then you might find this is not available in c# currently.

Regards
Scott Blood
"Fox" <sdasd> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl...
NewBie question.

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).


Mar 20 '06 #3

"Fox" <sdasd> kirjoitti viestissä:uR**************@TK2MSFTNGP10.phx.gbl...

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).


If you mean settings you can set from Project => Properties => Settings..
then you could use something like this (assuming you have FormSize in
settings) to set for example form size:

this.Size = Properties.Settings.Default.FormSize;

check small example in
http://www.sorrowman.org/c-sharp-pro...-settings.html where I
use that way to set things.
Mar 20 '06 #4
My.Settings and My.Resources have direct equivalents in C# via the
autogenerated Settings and Resources classes in your project (both in the
Properties namespace).
(Other My equivalents are a little less direct).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter

"Fox" wrote:
NewBie question.

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).

Mar 20 '06 #5
Fox
Oh Thank so much.
"SorrowMan" <no@mails.invalid> ¼¶¼g©ó¶l¥ó·s»D:%2***************@TK2MSFTNGP12.phx. gbl...

"Fox" <sdasd> kirjoitti vi***********************@TK2MSFTNGP10.phx.gbl...

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).


If you mean settings you can set from Project => Properties => Settings..
then you could use something like this (assuming you have FormSize in
settings) to set for example form size:

this.Size = Properties.Settings.Default.FormSize;

check small example in
http://www.sorrowman.org/c-sharp-pro...-settings.html where
I use that way to set things.

Mar 21 '06 #6

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

Similar topics

6
by: GS | last post by:
Hi, There is reference about accessing settings file in VB.NET but nothing about C#. How do I read settings in application settings file with C#? Thanks, G
2
by: GS | last post by:
How do I use My.Settings equivalent in C#? Below is part of MSDN documentation about accessing settings file. I wrote C# console application using VS 2005 and .NET 2.0 and would like to use new...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
10
by: Chris Dunaway | last post by:
I have an .exe console project and a class library project as part of a solution. The .exe has an App.config file and I have used the Settings page to add some Application level settings. When...
2
by: MacKris | last post by:
Hi, I'm a chemist trying to use the python script GaussSum.py with gnuplot for creating dataplots, and need some help. Whenever I try to produce a plot from the GaussSum GUI I get the error sh:...
3
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...
5
by: Andy | last post by:
I need to write a VB.NET WinForms app. For this purpose I need to keep some settings of the application, like many other Windows applications do. The most obvious solution is to store settings in...
0
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...
6
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a...
5
by: Rainer Queck | last post by:
Hello NG, Is it possible to share the settings of an application with a class libreary? In my case I have a application and a set of different reports (home made) put into a class library. The...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.