Showing results for 
Search instead for 
Did you mean: 

Panel close? event.

I loaded "" by asynchronous way from [load] button then stop "" by pressing the [quit] button.
In this case, can loaded again in


But if I press panel close ("X") in stopping, cannot be loaded again in
Of course, This can be solved by stopping the while loop of (adding <This VI> - Panel Close?).


I confused a little bit because I have never added Panel Close? to my event structure usually.
Is it one of special things I have to take care in programming open VI reference?



Download All
0 Kudos
Message 1 of 3
  • You don't need any references. The Vi knowns it's own reference.
  • You can use a plain "panel close" (notify event) event if you want to unconditionally stop the VI. You only need a "panel close?" (filter event!) event if you potentially want to discard the click on the [x].
  • Not sure why you use such a strange mechanical action for the quit button. Latch action is preferred.
  • Closing a panel of a subVI does not stop the subVI. It just closes the panel. If you stop the loop using a panel close event, your subVI will stop, same as with the quit button.


0 Kudos
Message 2 of 3

See if something like this works for you:




Now you can even delete the "quit" control and have everybody use the [X] to kill the VI as any windows users already knows. 😄


(That's what I use. My programs typically don't have stop/quit, etc. buttons! If cleanup code is needed, use a "panel close?" event, discard it, and initialize the proper shutdown procedure.)

Message 3 of 3