Use the form’s WindowState property.

To minimize:

this.WindowState = System.Windows.Forms.FormWindowState.Minimized;

 

To maximize:

this.WindowState = System.Windows.Forms.FormWindowState.Maximized;