09-12-2009 11:33 AM
I want when the end user click the program's x red button at the top right, a dialog box with two buttons will pop out and say "are you sure?", if the end user click Ok, the program will shut off and close its window, if the end user click cancel, the program continues to run.
So I start building the vi, refer attached, but I was flipping the help search without knowing what is the name of that red x button, and i cant find the function block!
So, my question is:
1. I want to wire into that x red close window button event to control my case structure, but where is that function block?
2. Where is the function block that shut off the program as well as close the program window?
Thanks.
Solved! Go to Solution.
09-12-2009 11:49 AM
09-12-2009 05:04 PM
I would add, by way of explanation, that you don't actually "tie into the button", you tie into the event that it represents.
That means that if you add an event for PANEL CLOSE?, that event gets triggered by all the things that would close the window: Clicking the CLOSE box (as mentioned), but also typing CTRL-W, selecting CLOSE from the FILE menu (if that's available), aborting the program from the TASK MANAGER (ctrl-alt-delete), and script operations on OS X.
Usually, that's what you want. The point is you're being asked if it's OK to close and you get a chance to say "no". But it doesn't necessarily come from the CLOSE box.
Blog for (mostly LabVIEW) programmers: Tips And Tricks