我在工程中加载了一个MDIParent1.cs..怎样来把其他的form设计为他的子窗体象在vb中的那样哦?

解决方案 »

  1.   

    看看这样是不是你要的效果吧设置MDIParent1的IsMdiContainer属性为True在创建子窗体时指定MdiParent 
    private void BtnNew_Click(object sender, EventArgs e)
    {
         Form2 f2 = new Form2();
         f2.MdiParent = this;
         f2.Show();
    }
      

  2.   

    先创建父窗体
    IsMdiContainer属性设置true
    新建个MainMenu,建立菜单如 新建
    新建 的点击代码如下
    private void menuItem1_Click(object sender, System.EventArgs e)
    {
    Form2 newMDIChild = new Form2();
    newMDIChild.MdiParent = this;
    newMDIChild.Show();
    }
    再建立一个窗口的顶级菜单
    属性有一个MdiList属性true运行就Ok了