I recently learned about My.Settings when trying to make a form to control a bunch of ‘quality of use’ options for one of my programs; background colors, text, font size– that sort of things.
I cant seem to get them to change though.
For Each btn As Button In Me.Controls.OfType(Of Button) btn.BackColor = My.Settings.ButtonBgColor Next
I have this on the form load, the color is set in the settings panel to be red. When the form loads all the buttons are the selected color red.
My.Settings.ButtonBgColor = Color.Blue
I have this on a button, just to see if it works. I click it. Nothing happens–as expected- then I close the program and run it again
Buttons are the original red
- I have it set to Save My.Settings on close
- I have it set to user so that it is read-write
What am I doing wrong?