Form1 aa = new Form1();
aa.Parent = this ;

解决方案 »

  1.   

    1——
    把主窗体设置为MDI窗体,而子窗体则打开为CHILD窗体2——
    设置子窗体的OWNER为主窗体3——
    定义子窗体的TOPLEVEL为FALSE,然后把子窗体的PARENT定义为主窗体的某个控件(比如PANEL)的子控件。
      

  2.   

    Form1 aa = new Form1();
    aa.MdiParent = this ;
      

  3.   

    private void menuItem8_Click(object sender, System.EventArgs e)
    {
    Form2 f = new Form2(@"Images\248.jpg");
    f.MdiParent = this;
    f.Show();
    }
      

  4.   

    对不起,笨牛哥,我还是不懂。请问如何才能将一个窗口打开为child窗体。
    我的代码如下:
                   Main main=new Main();
    this.MdiParent=main;
    this.Owner=main;
    this.TopLevel=false;
    可不可以给点代码来看看