title: C#: How to access a button outside the form class
body: <p>I want to either enable or disable a button from another file,what should I do?</p>
  
  <p>This is the form class declaration:  </p>
  
  <pre><code>public partial class Form1 : Form
  </code></pre>
  
  <p>I tried with </p>
  
  <pre><code>Form.btnName.enabled = false/true 
  </code></pre>
  
  <p>but there's no btnName member.</p>
  
  <p>Thanks in advance!</p>