Windows应用程序C#创建MDI父窗体和子窗体
2007-11-25 20:58
183 查看
一:创建父窗体
1.创建 Windows 应用程序.
2.在"属性"窗口中,将 IsMDIContainer 属性设置为true. 这将该窗体指定为子窗口的MDI 容器.
3.设置菜单栏工具栏等控件.假设点击按钮button1的触发事件为打开子窗体child.cs.
二:创建子窗体
1.添加一个Windows窗体,命名为child.cs.
2.设置所需控件.
3.在父窗体中双击button1添加代码:
private void button1_Click(object sender, EventArgs e)
{
child newMDIChild = new child();
newMDIChild.MdiParent = this;
newMDIChild.Show();
}
1.创建 Windows 应用程序.
2.在"属性"窗口中,将 IsMDIContainer 属性设置为true. 这将该窗体指定为子窗口的MDI 容器.
3.设置菜单栏工具栏等控件.假设点击按钮button1的触发事件为打开子窗体child.cs.
二:创建子窗体
1.添加一个Windows窗体,命名为child.cs.
2.设置所需控件.
3.在父窗体中双击button1添加代码:
private void button1_Click(object sender, EventArgs e)
{
child newMDIChild = new child();
newMDIChild.MdiParent = this;
newMDIChild.Show();
}
相关文章推荐
- c#的Windows应用程序创建
- C#使用定时任务框架Windows.TaskSchedule.exe安装控制台应用程序创建的Windows服务
- C#笔记整理——用C#创建Windows应用程序
- C#演练—Windows应用程序演练—创建简单的Windows窗体
- 九、C#编程实战演习ABC 2、用Visual C# 创建Windows应用程序
- C#演练—Windows应用程序—创建主-从windows窗体
- 创建 C# Windows 窗体应用程序
- 如何:创建 C# Windows 窗体应用程序
- C#演练—Windows应用程序—在windows窗体上动态创建上下文菜单
- C#_ACCP_Windows_创建多文档界面应用程序MDI
- 设置c#windows服务描述及允许服务与桌面交互的几种方法(作者博客还有一大堆C#创建服务的文章)
- C# 从windows应用程序导出数据到excel
- C# 创建Windows(NT)服务
- windows 应用程序窗口的创建
- C# 设置Windows 窗体的屏幕位置,动态创建的Form
- 面向对象,掌握windows应用程序的创建过程:为应用程序添加消息及响应
- 用C#创建Windows服务(Windows Services)
- 【C#遗补】获取应用程序路径之System.IO.Directory.GetCurrentDirectory和System.Windows.Forms.Application.StartupPath的区别
- C#开发WINDOWS应用程序时消息的处理
- 用c#创建支持多语言的WinForm应用程序