title: c# call button event that is on another winform
body: <p>i want when i click on button1 on form1 to call button2 that is on form2 and execute the code that is under button2 event.</p>
  
  <p>The following code won't work:</p>
  
  <pre><code>button2.PerformClick();
  </code></pre>
  
  <p>The error i get is "button2 does not exist in current context", so i tried to set modifiers to public, also click event to set on public void... no luck.
  <code>form2.button2.PerformClick();</code> also doesn't work.</p>