views:

1705

answers:

6

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.

+13  A: 

FormName.WindowState = FormWindowState.Minimized;

JP
+6  A: 
<form>.WindowState = FormWindowState.Minimized;
Craig Eddy
+2  A: 
Form myForm;
myForm.WindowState = FormWindowState.Minimized;
+14  A: 
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
     if(e.KeyChar == 'm')
         this.WindowState = FormWindowState.Minimized;
}
+3  A: 

in c#.net this.WindowState = FormWindowState.Minimized

A: 

Take a hammer and beat the screen until it and the window is minimized.

Clay Blackwelder