📄 form1.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void ToolStripMenuItem_Exit_Click(object sender, EventArgs e)
{
this.Close();
Application.Exit();
}
private void ToolStripMenuItem_Open_Click(object sender, EventArgs e)
{
Form2 newMDIChild = new Form2();
// 设置父窗体
newMDIChild.MdiParent = this;
// 显示新窗体
newMDIChild.Show();
}
//层叠
private void ToolStripMenuItem_Cascade_Click(object sender, EventArgs e)
{
this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade);
}
//水平平铺
private void ToolStripMenuItem_H_Click(object sender, EventArgs e)
{
this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
}
//垂直平铺
private void ToolStripMenuItem_V_Click(object sender, EventArgs e)
{
this.LayoutMdi(System.Windows.Forms.MdiLayout.TileVertical);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -