Event when window is minimizex/maximized
-
Friends, How do i handle the event when window is minimized to the taskbar by clicking the minimize button. Also i want to handle the event when user clicks taskbar button to maximize it. I cant find these events in events window.
Imtiaz
-
Friends, How do i handle the event when window is minimized to the taskbar by clicking the minimize button. Also i want to handle the event when user clicks taskbar button to maximize it. I cant find these events in events window.
Imtiaz
-
Friends, How do i handle the event when window is minimized to the taskbar by clicking the minimize button. Also i want to handle the event when user clicks taskbar button to maximize it. I cant find these events in events window.
Imtiaz
hi, I think you shuld use the sizeChanged event which is fired whenever the size of the form changes. in the sizeChanged event you should add the following code
if(this.Size == this.MaximumSize) //....Do the following, the form is maximized if(this.Size == this.MinimumSize) //.... DO he following, the form is minimized
good luck -
You have to use the Activated event and in that check the windowstate of the form. Hope that works for u...
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
hi this wont work cz it is only fired when the form comes to the active mode from the inactive mode which is not the case here.
-
Friends, How do i handle the event when window is minimized to the taskbar by clicking the minimize button. Also i want to handle the event when user clicks taskbar button to maximize it. I cant find these events in events window.
Imtiaz
The shortest way to do is : In the Form Resize event check for "FormWindowState". Eg: private void Form1_Resize(object sender, System.EventArgs e) { if (FormWindowState.Minimized == WindowState) { //Your code .. } } Regards, Bhupi Bhai.