My program terminate command is as follows:
This works well every time. However, when I use the windows standard (X) button in the upper right hand corner of the window, the application becomes invisible but remains running. The application appears in the task manager and can only be closed using "End Task". The average user will always use the (X) as a way to exit any application. How do I get the (X) button to terminate my program?