I tried to create a new form inside the Parent. I set FormBorderStyle
to none
.
When I am adjusting MDIParent to the myForm
, it gave me a sick looking error like this:
System.ArgumentException : The given Form is not being recalled as a MdiContainer.
This is my code for creating a new Windows Form.
FrmHome myForm = new FrmHome ();
myForm.TopLevel = false;
pnlContainer.Controls.Add(myForm);
myForm.Show();