Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:36:29+00:00 2026-06-11T02:36:29+00:00

When user changes background color for example, the Settings.settings file is modified. And it

  • 0

When user changes background color for example, the Settings.settings file is modified. And it works.

But the application doesn’t change it’s background color after user clicks OK.
It works only when I close and build the application again.

How can I reload my form or user control on button click? (Tried with .Refresh(), but it doesn’t work)

    private void refreshSettings()
    {
        this.BackColor = Properties.Settings.Default.bgdColor;
        this.Font = Properties.Settings.Default.fontType;
        this.ForeColor = Properties.Settings.Default.fontColor;
    }

    private void Settings_Load(object sender, EventArgs e)
    {
        refreshSettings();
        bgdColorLBL.BackColor = Properties.Settings.Default.bgdColor;
        fontColorLBL.BackColor = Properties.Settings.Default.fontColor;
        fontTypeLBL.Font = Properties.Settings.Default.fontType;
        fontTypeLBL.Text = Properties.Settings.Default.fontType.Name;
    }

    private void okBTN_Click(object sender, EventArgs e)
    {
        LeagueUC lg = new LeagueUC();
        InitializeComponent();
        this.Close();
    }

    private void bgdColorLBL_Click(object sender, EventArgs e)
    {
        ColorDialog dlg = new ColorDialog();
        dlg.Color = Properties.Settings.Default.bgdColor;

        if (dlg.ShowDialog() == DialogResult.OK)
        {
            Properties.Settings.Default.bgdColor = dlg.Color;
            Properties.Settings.Default.Save();
            bgdColorLBL.BackColor = dlg.Color;
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:36:31+00:00Added an answer on June 11, 2026 at 2:36 am

    Run whatever code you have that sets the control’s properties at start up from the settings file.

    e.g.

        private void bgdColorLBL_Click(object sender, EventArgs e) 
    { 
        ColorDialog dlg = new ColorDialog(); 
        dlg.Color = Properties.Settings.Default.bgdColor; 
    
        if (dlg.ShowDialog() == DialogResult.OK) 
        { 
            Properties.Settings.Default.bgdColor = dlg.Color; 
            Properties.Settings.Default.Save(); 
    
            Settings_Load(null, null);
        } 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to change the body background color when the user changes the
I created functionality in an appwidget that allows a user to change the background
I'd like to change a background image of my button each time user presses
I would like to immediately propagate user changes (change of user roles) in my
I am running a timer and performing a redirect after a user changes his
The following example displays a modal dialog box when the user clicks the button.
I have a nice script which lets you change the background color of a
i have this jquery script that changes the color of the background instantly by
When the user changes the language locale, I would like to reload the activity
I want to edit links when the user changes the value of a <input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.