//clear forms in a splitContainer.Panel control
private void clearForms()
{
string[] array = { "frmProcedure", "frmSurvey1", "frmSurvey2", "frmSurvey3" };
foreach (string s in array)
{
Control ctl = this.splitContainer1.Panel2.Controls[s];
if (ctl != null)
{
this.Controls.Remove(ctl);
ctl.Dispose();
}
}
}