07-30-2019 09:38 AM
@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
07-30-2019 09:45 AM
@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
07-30-2019 09:52 AM
I just tested it and the Panel Close Event does capture the Ctrl close.
07-30-2019 10:23 AM
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
07-30-2019 11:13 AM
@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.
07-30-2019 12:40 PM
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