Windows Develop Bookmark and Share   
 index > Windows Forms General > Handling title-bar buttons...
 

Handling title-bar buttons...

What is the trick to handling the title-bar buttons. I'm not really concerned with min/max but mostly the close button so I can preempt the closing of the application and gracefully shutdown my application threads...

What event do I need to trap?

Thanks,

D

dl0haus  Tuesday, April 10, 2007 6:44 PM

You can put the necessary logic to shutdown your application threads in the form's FormClosing() event, which is called before the form is closed.

Thanks,
Rashmi

Rashmi Gopinath  Tuesday, April 10, 2007 7:39 PM

You can put the necessary logic to shutdown your application threads in the form's FormClosing() event, which is called before the form is closed.

Thanks,
Rashmi

Rashmi Gopinath  Tuesday, April 10, 2007 7:39 PM

You can use google to search for other answers

Custom Search

More Threads

• Disposing grid cells and ContextMenuSrtip
• custom themes for winforms?
• How to prevent ComboBox auto DropDown
• How to find default smtp server for outgoing mail?
• DrawString string width
• Model Dialog box causes another application to get focus
• forcing an event
• How to get "if file size bigger than ??"
• Printing margins do not match - RichTextBox
• Repeat Sub until Button is Pressed?