Equivalent of FormClosing event, but for custom controls

V

V

I've got a custom control that uses a timer. Need to make sure that
the timer gets shut down when the control exits. Breakpoints set on a
destructor for the control do not execute, but I'd like to do this
earlier anyway. Is there a way to latch onto an event that will signal
when the control is closing?
 
F

fitim skenderi

Use Disposable pattern (check IDisposable interface on the MSDN)

Fitim Skenderi
 

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

Top