Windows窗体中的MDIContainer [英] MDIContainer in windows form

查看:162
本文介绍了Windows窗体中的MDIContainer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用MDI Container时遇到问题.我在属性中将主页形式设为Home,其形式为IsMDIContainer = true.当我单击主页表单上的按钮时,我应该打开另一个表单.以下是我使用的代码片段,此正确的操作是我需要做的更改.但是表格没有显示


I am facing an issue when trying with MDI Container. I have made my home page form-Home as IsMDIContainer = true in properties. When I click a button on the home page form I should open another form. Following is the code snippet I''ve used is this correct what change I need to do. but the form didnt show


Test objTest = new Test();
        objTest.MdiParent = this;
        objTest.Show();



我在首页中使用了拆分面板,我正在调用的页面大小是拆分面板的panel2大小

在此先感谢



I''ve used split panel in home page, the size of the page I''m calling is the panel2 size of split panel

Thanks in advance

推荐答案

好的,我知道了.您添加了SplitContainer ,它隐藏了您的子窗体.
将子表单添加到SplitContainer''s panel
splitContainer1.Panel2.Controls.Add(objForm);
Ok, I got it. You have added SplitContainer that is hiding your Child Form.
Add child form to SplitContainer''s panel
splitContainer1.Panel2.Controls.Add(objForm);


这篇关于Windows窗体中的MDIContainer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆