C# winForm里窗体嵌套

            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中的窗体.

posted @ 2016-04-29 16:56  simadi  阅读(492)  评论(0编辑  收藏  举报