1.关闭
private void btnClose_Click(object sender, EventArgs e)
{
Application.Exit();
}
2.最大化
private void btnMaxForm_Click(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Normal)
{
this.WindowState = FormWindowState.Maximized;
//btnMaxForm.IconChar = IconChar.WindowRestore;
}
else
{
this.WindowState = FormWindowState.Normal;
//btnMaxForm.IconChar = IconChar.WindowMaximize;
}
}
3.最小化
private void btnMinForm_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}