10-24-2013 06:41 PM - edited 10-24-2013 06:52 PM
@apok wrote:
nathan....I dont want to go round and round here, your sub vi's take 2 clicks to exit, while my example uses (stop) one click to exit the loop and shut down front panel , without the option to use (X) as i disabled that option in the vi properties.
No, they don't - so long as they're not already open when you start the main VI because the "Close afterwards if originally closed" option is checked. Your VI, meanwhile, ignores what the poster asked for, which was to be able to stop and close the VI by using the Close box that every other application uses - and, as the poster noted, your VI doesn't work when run a second time, because setting the Closeable property when the VI stops re-enables the close box.
EDIT: OK, yes, they take two clicks to exit if you count clicking the confirmation dialog box, but I think it is obvious how to remove that if you don't want it. I was just trying to show that catching the close event gives you the flexibility to add a confirmation dialog, like many applications do.
10-24-2013 10:04 PM
Here