简体   繁体   English

在c#中自定义MDI

[英]Customize MDI in c#

In my project i have to run multi-interfaces at a time. 在我的项目中,我必须一次运行多个接口。 I used isMdicontainer property. 我使用isMdicontainer属性。 But problem is whole area is converted to MDI. 但问题是整个区域被转换为MDI。 Can i set boundaries for it,like in Photoshop(below menu-bar there is toolbar,below toolbar Mdi is appearing). 我可以为它设置边界,就像在Photoshop中一样(在菜单栏下方有工具栏,工具栏Mdi正在出现)。

And I like the tab structure in Photoshop used to switch images. 我喜欢Photoshop中用于切换图像的标签结构。 How can i introduce that into my project for switching between forms. 我如何将其引入我的项目之间切换表单。 I am using VS 2010, Doing project in C#(Win forms), net framework 3.5 我正在使用VS 2010,在C#(Win表单)中执行项目,net framework 3.5

Thanks in advance. 提前致谢。

You can use container controls like Panels and Dock them to the side — this will reduce the area of the MDI child area. 您可以使用Panels之类的容器控件并将它们停靠在一侧 - 这将减少MDI子区域的面积。

As far as tabs are concerned, that's a different beast than the MDI model. 就标签而言,这是与MDI模型不同的野兽。 You can try Multi Document Interface (MDI) tab page browsing with C# 您可以尝试使用C#浏览多文档界面(MDI)标签页

You can do a lot of things, 你可以做很多事情,

The following tasks are illustrated Here : 以下任务说明如下

  • Creating the main menu for your form. 为表单创建主菜单。 The actual name of the menu will vary. 菜单的实际名称会有所不同。
  • Adding the ToolStripPanel control to the Toolbox. 将ToolStripPanel控件添加到工具箱。
  • Creating a child form. 创建子表单。
  • Arranging ToolStripPanel controls by z-order. 按z顺序排列ToolStripPanel控件。

The following steps should give you a start. 以下步骤应该为您提供一个开始。

  • Add a MenuBar a ToolStrip and a TabControl to your main form. MenuBar ToolStripTabControl到主窗体。
  • Set their Dock property to DockStyle.Top . 将其Dock属性设置为DockStyle.Top
  • Resize the TabControl so that the tabpages are hidden. 调整TabControl大小,以便隐藏选项卡。
  • When you open a new MDI form add a tab and select it. 当您打开新的MDI表单时,添加选项卡并选择它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM