Great question, and we do get this one a lot. The solution posted by the other customer was creative and does work just as well.
Another option is possible. We always suggest that users create a control button which is designed to exit the running application. When you generate all code, you have an option of setting a selected control callback to contain the QuitUserInterface(). If you check one here, I believe that CVI automatically will tie your X click box from windows to this control callback, and thus quit your running application when you click the X.
If you didn't do this when you first generated the code, don't fear. Double click on your panel, and under the panel settings you see an option for "Close Control" This is the X button. When you change this to
a specified callback, this is where the application will navigate to when your end user hits the X button.