title: c# winform Resizing button on different form
body: <p>I want to resize my button on <code>form2</code> using the button on <code>form1</code>. </p>
  
  <p>This is my code and it gives me error: </p>
  
  <pre><code>public void button7_Click(object sender, EventArgs e)
  {
      Form2 f2 = new Form2();
      int x = Convert.ToInt32(textBox7.Text);
      int y = Convert.ToInt32(textBox8.Text);
      f2.button8.Size = new System.Drawing.Size(x, y);
  }
  </code></pre>
  
  <p>It has an error at <code>Form2.button8.Size</code> .. I made my <code>button8</code> Public so it can be accessed..
  but still it gives me error <em>"Form2.button8 is inaccessible because of its protection level"</em>.. </p>
  
  <p>this is my button8 at form2</p>
  
  <p>public void button8_Click(object sender, EventArgs e) 
  {
  }</p>
  
  <p>How can I solve this issue?</p>