title: I've got 3 forms. Form2, forbutton2, and ProfileView
body: <p>I showed forbutton2 on a panel inside the Form2, I wanted to put a button on my forbutton2 that will show the ProfileView on panel also inside a form 2. </p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
    ProfileView myForm = new ProfileView();
    myForm.TopLevel = false;
    myForm.AutoScroll = true;
    Form2.panel4.Controls.Add(myForm);
    myForm.Show();
  }
  </code></pre>
  
  <p>this is the code on the button from forbutton2 form.</p>
  
  <p>These were the errors prompted in the code I used:</p>
  
  <blockquote>
    <p>Error 1: An object reference is required for the non-static field, method, or property '<code>Form2.panel4</code>'<br>
    Error 2: '<code>Form2.panel4</code>' is inaccessible due to its protection level</p>
  </blockquote>