Excel 2007插件-将C#.net Windows窗体显示为Excel的MdiChild [英] Excel 2007 Addin - Display C#.net windows form as MdiChild of Excel
本文介绍了Excel 2007插件-将C#.net Windows窗体显示为Excel的MdiChild的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在excel addin 2007项目中,我有一个Windows窗体.我需要将此Windows窗体显示为Excel应用程序的MDI子级.
现在,它以单独的形式显示.
In excel addin 2007 project, I have a windows form. I need to display this windows form as the MDI child of Excel application.
Now its displayed as a separate form.
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Form1 obj = new Form1();
obj.Show();
}
请尽早为我提供帮助.
Please help me as early as possible.
推荐答案
设置子窗口的MDIParent属性后,它会变成
父级的MDIChild.
Form1.MdiParent = parentForm;
我不确定使用Excel作为父级文件是否可以很好地工作,但是请尝试并报告发生的情况.
When you set the MDIParent property of a child window it becomes an
MDIChild of the parent.
Form1.MdiParent = parentForm;
I''m not sure how well this will work using Excel as the parent, but try it and report back what happens.
这篇关于Excel 2007插件-将C#.net Windows窗体显示为Excel的MdiChild的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文