private void button1_Click(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Normal)
{
this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width,
Screen.PrimaryScreen.WorkingArea.Height);
WindowState = FormWindowState.Maximized;
}
else
{
WindowState = FormWindowState.Normal;
}
this.Refresh();
}