LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

POPUP Window Asinchronous Call

Solved!
Go to solution

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.

0 Kudos
Message 1 of 5
(2,820 Views)

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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(2,815 Views)

I made up an example.

Ty for your time & help.

Download All
0 Kudos
Message 3 of 5
(2,804 Views)

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:

 

  • Have a queue that the "Main.vi" can pass commands to
  • Pass the queue referance to the Pop-up from Main.vi
  • Change Pop-up to a non-greedy loop (Just moving to an Event driven Message handler will solve that!)

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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(2,795 Views)
Solution
Accepted by topic author AntonioNI

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.

Download All
0 Kudos
Message 5 of 5
(2,759 Views)