LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Functional "Close all Open VIs when Main VI closes" Example

Solved!
Go to solution

@mcduff wrote:


I would recommend using the Panel Close? event instead. The Application Close? Event should fire in an EXE, but not in the development environment (IDE).

 

mcduff


You need both, one is for 'X' the other for Ctrl+Q.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 16
(485 Views)

@Yamaeda wrote:


You need both, one is for 'X' the other for Ctrl+Q.

/Y


I never used the other, only the Panel Close Event. Doesn't Crtl+Q initiate a Panel Close event which will then fire?

 

mcduff

0 Kudos
Message 12 of 16
(481 Views)

I just tested it and the Panel Close Event does capture the Ctrl close. 

Message 13 of 16
(477 Views)

I have a strong memory there's some instance that sends the Application Close-command, like windows shutting down. It was a long time since i messed with it, i've just done both since then, maybe i never really needed to. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 16
(467 Views)

@Yamaeda wrote:

I have a strong memory there's some instance that sends the Application Close-command, like windows shutting down. It was a long time since i messed with it, i've just done both since then, maybe i never really needed to. 🙂

/Y


I dabbled a bit in .NET programming a long time ago, and I seem to remember this also, but my memory is way fuzzier than yours.  Believe it or not, I think you had to handle both events explicitly in that dev environment, too - if you wanted to shut down gracefully.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 15 of 16
(457 Views)

Hoo-hah -- am I remembering Fabiola's VI correctly?  Could she have said "Panel Close?" instead of "Application Close?".  Do I even remember which one(s) I've used?  [I looked at some code several years old, and I was using "Application Close?", and thinking about it, this makes more sense if you are asking how to shut down an entire application ...].

 

If you are dealing with a Top-Level VI, I'm guessing "Panel Close" and "Application Close" accomplish the same thing.  On the other hand, if it's a Modal VI, they are different.  It might be an interesting thing to see if these two Events behave differently in such a case, one stopping just the VI, the other shutting down the entire Application (just because it "makes logical sense" doesn't mean it actually works that way ...).

 

Bob Schor

Message 16 of 16
(441 Views)