07-24-2011 02:47 PM
Hello there
I have four boolean button on a main vi where user could click each button to open another front panel. The subvi settings let the sub-vi belonging to each button to open when called and closed afterwards. On closing subvi using boolean button, user returns to the main screen. Execution of main vi stops by pressing stop button. I could not really find the way to close the front panel of main vi by stopping execution (pressing stop button). As it stands now, after clicking stop button execution stops and user have to click the run indicator on the menu bar to run the main vi again.
Is it possible to close the front panel of the main vi by pressing stop button. So every time user have to re-run main vi, it is done by clicking the icon of the application.
Kind Regards
AustinCann
07-24-2011 03:54 PM
For an exe,
the main front panel should close when the program end. However, if you have enabled debugging checked under (Build Specification -> Advanced) for your exe, the front panel will stay open after the exe is done running.
For a vi in development mode,
you can use the invoke node with the FP.close method. Remember to feed reference "This Vi" into the invoke node. Also, you can use the quite LabVIEW node under application control.
07-24-2011 04:23 PM
Create a run-time menu under Edit with an Exit funtion under files, like any other application you have ever used. Use the Quit Labview function if the user selects Exit. Use the visible property node to hide the stop button if in application mode. This way you will have access to it during development mode or you can get rid of the stop button all together. The user should not be able to stop the application unless exiting.