TurnOn_RestOfToolStripItems_22()
should be an instance method, not static
.Form2
needs a reference (e.g. _form1
) to a Form1
instance.- Given that reference, SomeCalculation() should be rewritten as:
private void SomeCalculation()
{
this._form1.TurnOn_RestOfToolStripItems_22();
}
That being said, a
Form
shouldn't directly modify the UI of another
Form
. It's better to raise an event to indicate a specific situation; other objects can then react to that event and modify themselves in any way the deem fit. This "separation of concerns" allows for loose coupling (and therefore more easily maintained) classes.
/ravi