I have a C# project and trying to open a child form (form3
) from another child form (form2
) but form2
goes aways behind to the parent's (form1
) objects.
As you can see, when I open my form2
, it hides the form1
objects:
But when I click in the button1
and open the form3
and close the form2
, form3
goes behind the form1
objects:
What should I do to solve this problem? Form3
should also hide form1
objects!
These are my code lines from button1
in form2
:
FormConsultaNome form = new FormConsultaNome();
Form1 form1 = new Form1();
form.MdiParent = Form1.ActiveForm;
form.Show();
this.Close();