I guess you are initializing the Child Window inside the Main Form's menu click event.
Declare a Child Form object outside the function and check for
null
.
Ex:
ChildForm childForm = null;
private void OnMenuClick (object sender, EventArgs e)
{
if (childForm == null)
{
childForm = new ChildForm();
}
childForm.Show();
}
You must call
Dispose
when you close the ChildForm.
Mark it as answer if it is helpful