如何打开窗体中的窗体? [英] How to open a form within a form?
本文介绍了如何打开窗体中的窗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个父窗体,我喜欢到父窗体中打开一个子窗体。
I have a Parent form and i like to open a child form within the the parent form.
可以这样做?如果是的话请回复我的示例代码。
Can this be done? If yes please reply me with sample code .
谢谢!
推荐答案
以下是代码做你想要什么:
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
希望这有助于...
这篇关于如何打开窗体中的窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文