|It seems like you have made
public static in your
FormCalendarCS class which is why you can access it (probably not a good idea!), whereas
buttonStart is an instance created in the designer of your
FormCalendarCS (exactly as it should be, check the contents of the designer.cs file).
Creating a new instance of the form will not get you the original button, just a new one on a new form that you haven't made visible so you will never see it.
First of all, change
private void buttonStart_Click(object sender, EventArgs e), there is no valid reason to have it any other way IMO, and if you have changed it, set the access modifier on
buttonStart back to
FormCalendarCS create this method:
public void ButtonStartPerformClick()
Inside your form where you first show your FormCalendarCS instance, add a field:
private FormCalendarCS formCalendarCS;
Before you show it, save the instance to the field.
formCalendarCS = new FormCalendarCS();
Now whenever you want to perform the click, just call:
If the relationships between your classes/forms are more complex, you will need to route the method call(s) appropriately and you may need to use events too if you need to call back up the chain.
Your problem boils down to not understanding instance vs static objects and methods. These are a fundemental part of any OOP language including C# so I suggest some study on this area.