ShowAllPage sAllPage = new ShowAllPage();
sAllPage.FormBorderStyle = FormBorderStyle.None;
sAllPage.Dock = DockStyle.Fill;
sAllPage.TopLevel = false;
this.MainPanel.Controls.Clear();
this.MainPanel.Controls.Add(sAllPage);
sAllPage.Show();
MainPanel为主窗体中的Panel控件,ShowAllPage为要在主窗体中显示中Panel中的窗体.