My program has multiple forms. Some of these forms would benefit greatly from being able to talk to one another, however if Form1 creates an instance of Form2, Form2 can not call back to Form1, at least not very easily.
Is it acceptable to make my forms static so they can talk to each other without the need to instantiate objects of these classes everywhere?
Yes it can – just make your
Form2instance know about the instance ofForm1, e.g. through a constructor:(Note that if your classes are really called
Form1andForm2, it would be worth giving them more semantically meaningful names. Reject the temptation to stick with whatever Visual Studio gives you 🙂I would strongly advise against using statics just to avoid providing your depenencies directly.