Solved

How Can I change a settings

Posted on 2008-06-21
5
199 Views
Last Modified: 2010-04-23
I have a variable in My.Settings  name ShortProductForm  as boolean .

How Can I change it to My.Settings.ShortProductForm = false / true . within My Application

Or as xml file.
0
Comment
Question by:Ahmadal_najjar2003
  • 3
  • 2
5 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 21837656
You just need to save it after you change it

My.Settings.ShortProductForm = False
My.Settings.Save()
0
 

Author Comment

by:Ahmadal_najjar2003
ID: 21837915
I Put it but the editor itself says (property is read only)
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 21837957
You defined the scope (when you define the setting) as user, not as application.
0
 

Author Comment

by:Ahmadal_najjar2003
ID: 21838734
So , do I have to set it as user. Bec I defined it as application .
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 21838822
Yes, you have to define as user not as application is you want to make changes on it.

"Scope indicates if the property is read-only. If the value is Application, the property is read-only; if the value is User, the property is read-write"
http://msdn.microsoft.com/en-us/library/saa62613(VS.80).aspx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now