$ 0 0 Trap the FormClosing event on the form itself and this will be fired whenever the user clicks on the X.