private void цвестToolStripMenuItem_Click(object sender, EventArgs e) { colorDialog1.ShowDialog(); Settings.Default.mecolor = colorDialog1.Color; menuStrip1.BackColor = Settings.Default.mecolor; главнаяСтраницаToolStripMenuItem.BackColor = Settings.Default.mecolor; Settings.Default.Save(); } 

Explanations:

  • mecolor is a setting that is responsible for the colors on the form
  • menuStrip1 - it is menuStrip1
  • главнаяСтраницаToolStripMenuItem is a button on the menu in the program

Here I have this code ... the settings are not saved :( What to do and how to fix it?

  • This code works for me and the setings are saved, provided, of course, that the name of the file you created and the class for storing Settings is wind -
  • I do not know .... I have to keep the form colors, but they are not saved: ( - Angus123
  • How do you determine that they are not saved? - wind
  • I have the original color of the form Green, I changed it to Red, and after that I saved the settings and then I launch it on a new one, and the color is not red, but green. - Angus123

1 answer 1

After saving the user settings in the source file, the value will not change if you open it again, because it displays the default value. But on subsequent program calls, you will get the saved value. Most likely when you download the application you do not change your settings for the necessary components of the system.

  • PS would kill for the Russian-speaking naming of controls =) - wind