I am using .NET Windows Forms. My MDI parent form contains the menu. If click the menu the form will be displayed. Up to now no problem.
UserForm uf = new UserForm();
uf.Show();
uf.MdiParent = this;
If I click the menu again another duplicate of the form is created. How to solve this issue?
This is my solution in ShowForm() and calling sample in aboutToolStripMenuItem_Click():
The cleanest way is to simply track the lifetime of the form instance. Do so by subscribing the FormClosed event. For example: