C# – way to programmatically minimize a window


What I'm doing is I have a full-screen form, with no title bar, and consequently lacks the minimize/maximize/close buttons found in the upper-right hand corner. I'm wanting to replace that functionality with a keyboard short-cut and a context menu item, but I can't seem to find an event to trigger to minimize the form.

Best Solution

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