How to pop up a confirmation dialog box when the user close the vision client?

The user asked for such a thing and I dont know how the configure a event to listen to the close window event.
Anybody have done such a fucntion in Vision before? Please help me out, thank you so much!

I would look at using the Client Event Scripts - Shutdown-Intercept


Words fail to express my appreciation for your help my friend!!! Thank you very much!!

Closing a window is not the same as shutting down the client.

To close a window? or to shutdown the client?