If I wanted to place some "cleanup" code in an application that would execute when the X is clicked to close a form, where would it need to be? There seems to be four candidates:

Deactivate
Disposed
FormClosed
FormClosing


There are lot of others, but they do not seem to have anything to do with ending a process.