Equivalent of FormClosing event, but for custom controls

  • Thread starter Thread starter V
  • Start date Start date
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?
 
Use Disposable pattern (check IDisposable interface on the MSDN)

Fitim Skenderi
 
Back
Top