Caputer Minimize Event

  • Thread starter Thread starter kiran
  • Start date Start date
K

kiran

How to captuer the Minimizing button event in the windows from..?
When I click Minimize button I have to do some action..? How can I do
this..? Is there any alternate avialable..?
Regards
kiran
 
kiran said:
How to captuer the Minimizing button event in the windows from..?
When I click Minimize button I have to do some action..? How can I do
this..?

Add an event handler to the SizeChanged event of your form.

this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged);


In the handling method, you can check if the form has been minimized and
perfom any action you like...
private void Form1_SizeChanged(object sender, System.EventArgs e)

{

if (this.WindowState == FormWindowState.Minimized)

{

// do something like this.onWindowMinimized();

}

else

{

// do something else

};

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top