I want to either enable or disable a button from another file,what should I do?
This is the form class declaration:
public partial class Form1 : Form
I tried with
Form.btnName.enabled = false/true
but there’s no btnName member.
Thanks in advance!
You need to expose the btnName member to other classes by making it public or using a property of sorts. For example add the following code to Form1
Now you can use form.ButtonName for any instance of Form1