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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close vi when it loses focus

Solved!
Go to solution

Hi Guys!

 

I have a popup VI that I need to close when it loses focus, for example if the user clicks back on the mother program.  I found an old example using the "is frontmost" property node, but this node won't give the feedback needed.

 

Have any ideas?

 

Thanks!
Christopher

0 Kudos
Message 1 of 6
(2,777 Views)

The popup itself can't be modal because that will prevent it from losing focus.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 6
(2,767 Views)

Use an Event Structure.  The event you are looking for is Application->VI Deactivation.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(2,762 Views)

Is that a 2013 event?  I don't see that in 2012. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 6
(2,756 Views)
Solution
Accepted by topic author Pickering

Most "Pop-up" Dialogs are Modal.  In order to get what you are seeking the pop-up must be "Floating"

Here is a quick example that may work close to what I thing you want---it may need some tweaks

Floater_BD.png


"Should be" isn't "Is" -Jay
Message 5 of 6
(2,755 Views)

Works like a charm, thank you!

0 Kudos
Message 6 of 6
(2,709 Views)