C#面板作为MDI容器 [英] C# Panel As MDI Container

查看:284
本文介绍了C#面板作为MDI容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,我想创建一个具有MDI容器属性的面板,即. isMdiContainer = true.

In C# i want to create a panel that has the properties of a MDI container ie. isMdiContainer = true.

我尝试过类似的事情

form.MDIParent = this.panel1;

但是那不起作用.有什么建议吗?

But that dont work. Any suggestions?

推荐答案

您可以创建自定义表单,删除所有边框和工具栏,以使其看起来尽可能地接近面板.然后,使该新的自定义表单成为MdiContainer.

You could create custom form, remove all borders, and toolbars to make it look as closely to a panel as possible. Then make that new custom form a MdiContainer.

基本上,只能在窗体上设置IsMDIContainer属性.这意味着只有一个表单可以是MdiContainer.

Basically, you can only set the IsMDIContainer property on a Form. This means that only a form can be a MdiContainer.

这篇关于C#面板作为MDI容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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