Right corner 'X' window button



Hello

Does anyone know how to catch the message resulted from the event on
tapping the upper right corner 'X' of a window?Please let me know if
this can be done.

Is there a way to remove it completly (that will help also)?

Thank You,
GM

.