I am opening a Form2 on a button click within Form1: Form2 f2 = new Form2()
In the case when the Form2 is already open, clicking the button on Form1 again shows that Form2 which is already open. But i want that the Form2 should not open when it is already open.
When Form2 is closed, then on clicking on the button again, it should display the Form2(as the Form2 is closed i.e. no instance of it is running).
How can this be done?
EDIT: I want that the Form2 should not open when it is already open.