Is there a way to capture the event when a user click on the X button on the top right corner of a form? I want to do something with the event when a user click on the X on the form. However, I could not figure out how to capture that.

Any help is appreciated!

ljCharlie