04-12-2016 09:04 AM
I want to call a popup window asinchronously from my main application so it does not stop the execution. The user could leave this window opened and work in the main window meanwhile. I want to bring the popup window to the front if the user re-opens the popup while it has already been called before. I know how to call the popup asinchronously but the vi will run again when stoped the number of time you "overcalled" it. So I just want the popup window to move to the front if it's already running, instead of reopening when I close it. PD: the popup window does not return any data to the main app.
Solved! Go to Solution.
04-12-2016 09:14 AM
It sounds like you want a "Floating" window rather than a pop-up "Modal" window. Can you share a bit of the code as an example?
The Property "Window.Behavior" is run-time writable. As an example, hit Shift+Space from any block diagram, that "Floating" tool-bar comes to your cursor. With a few more details this sounds very do-able.
04-12-2016 09:47 AM
I made up an example.
Ty for your time & help.
04-12-2016 10:18 AM
Thank you for that example code! it helped me understand what you want and how you are doing it.
First, What is the point of the pop-up window if it does not pass "User Supplied Information" back to the application? I know, that sounds sort of technical but really, what is the point?
Next, you are using the 0x80 flag wrong! You want one instance of the pop-up! so send it an "Event" from "Main.vi" to set the windows property between "Hidden" and "Floating." Yes, that means you need to restructure the pop-up a little to:
Then you need to remember the referance to the pop-up from "Main" (so you have some means of knowing if it is running already or, if you need to launch it again)
Asynchcronos calls can be tricky - untill you realise that your top-level USUALLY needs to know something about the refered to vi's run state.
04-13-2016 09:21 AM - edited 04-13-2016 09:22 AM
I ended up doing this. (see atached vi's).
The popup window is ment to display some information to the user wich is loaded from CSV files directly from the popup window and selected there by the user aswell. So it does not return any data to the main program.
If you find something wrong/harmfull by doing it this way plz tell. Thanks!
PD: Ignore the comment on MainVi. Now it works as intended.