In the Form:
Minimize:
this.WindowState = FormWindowState.Minimized; //最小化
maximize:
this.WindowState = FormWindowState.Maximized;
normalization:
this.WindowState = FormWindowState.Normal;
Close (form):
this.Close();
Normalization of a button, switch to maximize each other:
Private void the button2_Click ( Object SENDER, EventArgs E) { IF ( the this .WindowState == FormWindowState.Maximized) // If maximizing { the this .WindowState = FormWindowState.Normal; // the normalization } the else IF ( the this .WindowState == FormWindowState.Normal) // if normalization { the this .WindowState = FormWindowState.Maximized; // is maximized } }