The error message "Top-level control cannot be added to a control" is self-explanatory.
It's easy to fix. Before you add a top-level control to a control, you need to set top level to false:
Code:this.panel1.Toplevel = false;
or
this.panel1.SetTopLevel(false);
Then you need to show the control, using Show(), after it's added to a control.
You can test whether the control is a top level control:
Code:bool bTopLevel = panel1.TopLevel;
bool bTopLevel = panel1.GetTopLevel();
When the control is not a top level control, it looses all the form level events such as Close().
Since the control is no longer the top level control, it doesn't look like a separate form. To compensate for this, you can add all your controls in a Panel.