那是你 dock和嵌套的关系不对

解决方案 »

  1.   


    我程序里是这样:Test.Dock = DockStyle.Fill;这个不对吗可是我把其他的像Bottom,Top,Left,Right都试过了,还是没法显示出状态栏,怎么回事?
    还有你说的嵌套怎么回事?我把代码贴出来给你看看吧!这是单击frmMain中的菜单栏中的【测试】按钮的事件:        private void 测试ToolStripMenuItem1_Click(object sender, EventArgs e)
            {
                if (!showChildrenForm("frmTest"))
                {
                    frmTest Test = new frmTest();
                    Test.TopLevel = false;
                    Test.Parent = this.splitContainer1.Panel2;
                    Test.Dock = DockStyle.Fill;
                    this.splitContainer1.Panel2.Controls.Clear();
                    this.splitContainer1.Panel2.Controls.Add(Test);
                    Test.Show();
                }
            }