To download NI software, including the products shown below, visit ni.com/downloads.
Overview
To prevent a user from closing a VI unless they use the Stop button that the developer has placed on the front panel.
Description:
Using Event Structures in LabVIEW, we have the ability to prevent a user from closing a VI unless they use the Stop button that the developer has placed on the front panel. For instance, if a developer has designed for the program to implement a proper shutdown procedure when the Stop button is pressed, clicking the Red "X" may prevent this procedure from occurring properly. This example prompts the user to close when the Red "X" is clicked and properly stops the program if they choose that option. This is similar to this Example Code using this "Panel Close?" event, but with additional functionality.
Instructions:
To implement this example:
To execute this example:
Requirements
Software
LabVIEW 2012 or compatible
Hardware
-
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.