Reputation: 60731
unfortunately my settings do not get saved. please help
If ColorDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Form1.BackColor = ColorDialog1.Color
My.Settings.mytext = My.Settings.mytext & Str(Abs(ColorDialog1.Color.ToArgb)) & ", "
End If
onload i load the settings back into the textbox
Upvotes: 0
Views: 3210
Reputation: 11652
Each and every time you set a setting, you need to remember to Save that setting otherwise there's really no point in setting it in the first place...
Example:
// edit a setting. My.Setting.MyName = "Jason";
// Now, save it. My.Setting.Save();
:-)
Upvotes: 1
Reputation: 21078
I did your above code in a windows form and it worked just fine. Are you sure it's not changing? I had a text box set to the value on form load and it did change even though in the app.config it didn't change at all.
EDIT:
Since these are user settings, they are saved in a user.config for the user's profile in local settings\application data folder.
Upvotes: 1