check if minimizebutton was clicked
-
Hy everyone! Could anyone of you tell me how to implement checking if the minimizebutton on my WindowsForm was clicked? I had a solution which worked but well when I switched over to another application to drag&drop some data the application was minimized as well and no longer shown in the taskbar. But what I want to do is: When switched to another application to drag&drop data the application only moves to the background but is still be shown in the taskbar. If the minimizebutton was clicked then my application should minimize and not be shown in the taskbar (except the icon to resize my application once again). Thanks! Stephan.
-
Hy everyone! Could anyone of you tell me how to implement checking if the minimizebutton on my WindowsForm was clicked? I had a solution which worked but well when I switched over to another application to drag&drop some data the application was minimized as well and no longer shown in the taskbar. But what I want to do is: When switched to another application to drag&drop data the application only moves to the background but is still be shown in the taskbar. If the minimizebutton was clicked then my application should minimize and not be shown in the taskbar (except the icon to resize my application once again). Thanks! Stephan.
hi, Minimizing a form to an icon at run time generates a Resize event. The WindowState property reflects the current state of the window. If you set the WindowState property to 1 (Minimized), the Form is minimized independently of whatever settings are in effect for the MinButton and BorderStyle properties. private void Form1_Resize(object sender, System.EventArgs e) { if(WindowState == FormWindowState.Minimized) >> check this } ************************** S r e e j i t h N a i r **************************
-
hi, Minimizing a form to an icon at run time generates a Resize event. The WindowState property reflects the current state of the window. If you set the WindowState property to 1 (Minimized), the Form is minimized independently of whatever settings are in effect for the MinButton and BorderStyle properties. private void Form1_Resize(object sender, System.EventArgs e) { if(WindowState == FormWindowState.Minimized) >> check this } ************************** S r e e j i t h N a i r **************************
sreejith ss nair wrote: this.WindowState.ToString()=="Minimized") OUCH!!!!!
WindowState == FormWindowState.Minimized
top secret xacc-ide 0.0.1