本文介绍了在C#中将Winfrom转换为MdiChild形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有三个winform,分别是Form1,Form2,Form3.其中(Form1)一个是mdiparent表单并包含菜单等.除了mdiparent表单,我在Form2中有一个按钮,当我单击该按钮时,将无法打开Form3表单. .我已经写了这样的代码
Hi All,
I have the Three winform say Form1,Form2,Form3.In that (Form1)one is mdiparent form and contain menu etc. Other than mdiparent form ,I have one button in Form2 from and when i click on that button ill be opening Form3 form. I have write the code like this
private void xbtnNew_Click(object sender, EventArgs e)
{
Form3 objForm=new Form3();
obForm.ShowDialog();
}
现在我想将mdiparent设置为form3.当我写
objForm.Mdiparent = Form1;生病的错误.
如何将mdiparent设置为form3?
请帮助紧急
谢谢
Now i want set the mdiparent to form3. when i write like
objForm.Mdiparent =Form1; ill getting error.
How can i set the mdiparent to form3 ?
Please help urgent
Thanks
推荐答案
objForms.MdiParent = MdiParent;
这篇关于在C#中将Winfrom转换为MdiChild形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!