文章目录

添加一个按钮button1. 添加点击事件 . 设置Form1的keyUp事件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
private void button1_Click(object sender, EventArgs e)
{
this.TopMost = true;
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
this.button1.Visible = false;
}

private void Form1_KeyUp(object sender, KeyEventArgs e)
{
this.TopMost = false;
this.FormBorderStyle = FormBorderStyle.Fixed3D;
this.WindowState = FormWindowState.Normal;
this.button1.Visible = true;
}
文章目录