How Can I change a settings

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.
Ahmadal_najjar2003Asked:
Who is Participating?
 
Jorge PaulinoIT Pro/DeveloperCommented:
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
 
Jorge PaulinoIT Pro/DeveloperCommented:
You just need to save it after you change it

My.Settings.ShortProductForm = False
My.Settings.Save()
0
 
Ahmadal_najjar2003Author Commented:
I Put it but the editor itself says (property is read only)
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
You defined the scope (when you define the setting) as user, not as application.
0
 
Ahmadal_najjar2003Author Commented:
So , do I have to set it as user. Bec I defined it as application .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.