How do I code my program to detect app termination from the upper right "X" ?

Printable View