Link to home
Start Free TrialLog in
Avatar of bman9111
bman9111

asked on

c# setting.settings

I have enter a test value for color.

this is what I did.

 public Form1()
        {
            InitializeComponent();
            this.BackColor = Properties.Settings.Default.myColor;
        }


 private void button1_Click(object sender, EventArgs e)
        {
            colorDialog1.ShowDialog();
            Properties.Settings.Default.myColor = colorDialog1.Color;
            Properties.Settings.Default.Save();
        }

when I close the application and rerun it the color that was picked is correct. However when I look at the setting.settings the color still shows the default color which I pick at first which was blue.

I have 2 questions:
1. where does the setting for the new color get saved at?
I looked at the exe.config and I see the blue color that I picked in the setup of the application. I do not see the new color that is coming up.

2. what does the synchronize button do when pressed. Everything I press it I get a messagebox that states :

No user.config files were found in any of the following locations:

ASKER CERTIFIED SOLUTION
Avatar of REA_ANDREW
REA_ANDREW
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bman9111
bman9111

ASKER

thank you, however I know how to set that. my question is these:

I have 2 questions:
1. where does the setting for the new color get saved at?
I looked at the exe.config and I see the blue color that I picked in the setup of the application. I do not see the new color that is coming up.

2. what does the synchronize button do when pressed. Everything I press it I get a messagebox that states :


I do appreciate the coding though.
any ideas?
u there?