I have code that I run if they use the exit button, but I want to trigger the same code if they use the red X to close the window. I've tried adding a handler to This.Close but I get an error because it is a 'Group Method'.
How can I catch the form close event so that my code always runs. (I don't want to just hide the X unless there is NO other way to resolve it).