Is there a way to programmatically minimize a window

Solution 1:

private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
     if(e.KeyChar == 'm')
         this.WindowState = FormWindowState.Minimized;
}

Solution 2:

FormName.WindowState = FormWindowState.Minimized;

Solution 3:

in c#.net

this.WindowState = FormWindowState.Minimized

Solution 4:

<form>.WindowState = FormWindowState.Minimized;

Solution 5:

Form myForm;
myForm.WindowState = FormWindowState.Minimized;