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