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 8153913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:10:14+00:00 2026-06-06T16:10:14+00:00

I am having some trouble with my code that is supposed to redo the

  • 0

I am having some trouble with my code that is supposed to redo the changes made by the user in the settings. When I click no after closing the form, the ribbonBar2 goes away, but when I open the settings up, the checkbox is still checked, although it isn’t supposed to be. Why?

Form1 frm1;
public Form8(Form1 frm1): this()
{
    this.frm1 = frm1;
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{             
    frm1.ribbonBar2.Visible = checkBox1.Checked;            
}

private void form8_closing(object sender, FormClosingEventArgs e)
{
    Properties.Settings.Default.checkBox1 = checkBox1.Checked;

    DialogResult result1 = MessageBox.Show("Do you want to Save your Settings?", "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
    if (result1 == DialogResult.Yes)
    {
        Properties.Settings.Default.Save();
    }

    if (result1 == DialogResult.No)
    {
        checkBox1.Checked = !Properties.Settings.Default.checkBox1;
    }

    e.Cancel = false;  
}
  • 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-06T16:10:17+00:00Added an answer on June 6, 2026 at 4:10 pm

    As it looks like no one is willing to help you with this…

    You don’t restore any setting that you saved. If I understand you right, you want to do something like this:

    public Form8(Form1 frm1): this()
    {
        // Restore the settings when loading the form
        checkBox1.Checked = Properties.Settings.Default.checkBox1;
    }
    
    private void form8_closing(object sender, FormClosingEventArgs e)
    {
        if (DialogResult.Yes == MessageBox.Show("Do you want to Save your Settings?",
                        "Warning!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
        {
            // Set the setting and save it
            Properties.Settings.Default.checkBox1 = checkBox1.Checked;
            Properties.Settings.Default.Save();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble with c code from a library that I use with
I'm having some trouble understanding this piece of code that my professor used as
I am having some trouble with my code. Okay so I have an ASPx
I'm having some trouble understanding a bit of code. I've got 2 classes Company
I am having some trouble trying to checkout the BitSharp source code using SVN.
I'm having some trouble with looping and creating MS Excel docs, code snippet below
I'm having some trouble with the jQuery hover method. Here's the relevant JavaScript code:
I'm having some trouble with finding the visibility param for JQuery. Basically... the code
I'm having trouble with some Regex code while scraping YouTube playlist pages. It mostly
I am having trouble with some javascript. The code snippet below creates a simple

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.