I Have parent form(FORM1) and I added this code
FORM2 form = new FORM2();
form.Show();
what I want is to enable one specific button (which is disabled by default) when my child form is called(opened) from parent. Can you please give me example how to do it
You’ll want to add a property like this one to your child form:
You can then use that property from the parent form(s) to change the visibility of the button.
Using a property such as this is much better, from a design perspective, than exposing the button publicly as you limit the ability of external entities to do only what they need to without giving them way more access then they need.