且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何打开窗体中的窗体?

更新时间:2023-12-06 16:14:46

以下是代码做你想要什么:

Following is the code to do what you want:

假设Button1的是在父窗体

Assume that button1 is in the parent form.

private void button1_Click(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            Form Form2 = new Form();
            Form2.MdiParent = this;
            Form2.Show();
        }



还有以下链接将为您提供更多更好的,你想做什么细节

Also the following link will provide you more better details of what you want to do:

HTTP:// WWW .codeproject.com / KB / CS / mdiformstutorial.aspx

希望这有助于...