Tell me, I can’t normally figure out the settings. Here I have the form color (red), I registered it in red in the settings. How to make it so that when you click on a button, a color selection dialog box appears, and the shape color becomes the color that the user chose? But I know how to do it, but how to do it so that the next time you start the program, this color is preserved?
|
2 answers
To preserve the color - it must be preserved. Application Settings and User Settings are intended for this. You can read about working with them in MSDN. Start, for example, from here .
|
I recommend to forget the color of the form in the settings field. Then everything will happen automatically (the Bindings property in the designer, add a property there, choose a data source - settings).
If something is not saved when rebooting, most likely the fact is that the settings file is re-created when compiled.
|