title: Saving the form state then opening it back up in the same state
body: <p>I have a small program in <code>winforms</code> that holds 3 buttons. Thus far the program lets the user change a the color of another button by clicking the corresponding button While the third button does not do anything yet. What I want to do is to let the user save changes made to the form (save the form state). So when the form is reopened it opens in that same state as saved.</p>
  
  <p>I hope I am being clear about what I am after</p>
  
  <p>Here is a visualization of the form:</p>
  
  <p><img src="https://i.stack.imgur.com/qy1AA.png" alt="enter image description here"></p>
  
  <p>The code that i have so far if any help:</p>
  
  <pre><code>public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              btnToColor.Text = "";
          }
  
          int c = 0;
          private void btnColorSwap_Click(object sender, EventArgs e)
          {
              if (c == 0)
              {
                  btnToColor.BackColor = Color.Yellow;
                  c++;
  
              }
  
              else if (c == 1)
              {
                  btnToColor.BackColor = Color.YellowGreen;
  
                  c++;
              }
  
              else if (c == 2)
              {
                  btnToColor.BackColor = Color.LimeGreen;
  
                  c = 0;
              }
  
          }
      }
  </code></pre>