2.3系统主界面的制作
一、操作效果图
设置之前

设置之后

二、实现MDI主界面的主要步骤
在MDI主窗体的【属性】对话框中,将MDI主窗体的IsMdiContainer属性设为true

button控件从工具箱拖到窗体上,如下图

给当前项目添加windows窗体,命名Child,如下图

给button添加Click事件
FormChild formChild1 = new FormChild();
formChild1.MdiParent = this;
formChild1.Show();
三、主界面中涉及到的控件以及控件的重要属性、方法。
(1)ImageScalingSize 工具栏或状态栏的项显示图像的大小
(2)Items 在工具条或状态条上显示的项的集合
(3)DisplayStyle 设置图像和文本的显示方式,包括显示文本、显示图像、显示文本和图像或什么都不显示
(4)Image 按钮/标签上显示的图片
(5)Text 按钮/标签上显示的文本
(6)Click 单击按钮/标签时,触发该事件
(7)Spring 指定项是否填满剩余空间
四、主界面的功能如何与系统结构图对应



5.贴入重要代码片段,并进行详细描述
FormChild formChild1 = new FormChild();
formChild1.MdiParent = this;
formChild1.Show();
将新建窗体设置为子窗体
网友评论