From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I'd like to have a user dialog that shows a message to the user but doesn't wait for the OK button being pressed to continue. I want to use it as a simple informative pop-up window that the user can close whenever he or she read it, without my code having to wait for the OK button.
I now use a self made VI that I call using the VI Server method 'Run VI' with 'Wait until done' set to FALSE. Or did I miss something obvious?
The only way to display a dialog box like that (or any other VI for that matter) is to spin it off using the VI Server as you are currently doing. That said, if you were to extend this logically, then what's really being asked
here is the ability to launch a VI dynamically without having to use
the VI Server. To be honest, I'm not sure what I think about that, but I would lean to be against this idea.
Rather, I would suggest that rather than making the VI specific to that dialog, you make a VI that is generic in that it wraps the Open VI Reference, Run Method, and Close Reference. You would just need to pass in the path to the VI.
We do this using Queues. You have a producer that adds messages to the queue (your dialog box message) and there is another section of code that is kicked off at the beginning of your execution that is the message consumer. The consumer simply pops up a window with any messages in the queue. This way it does not stop execution of the producer code.
There is some more information and examples on queues available with help.
You can just make a dialog VI that completes immediately (i.e. no while loop, etc.) and set the window to not close when done. Now just call the VI and close it's window at leisure later with the X in the upper right corner.