if (this.WindowState == FormWindowState.Maximized)
{
btnmax.Text = "最大";
this.WindowState = FormWindowState.Normal;
}
else
{
btnmax.Text = "还原";
//Tooltp(button2, "还原");
this.WindowState = FormWindowState.Normal;
this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
this.WindowState = FormWindowState.Maximized;
}
this.WindowState = FormWindowState.Minimized;
Application.Exit();