LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event for "Front panel state change"?

Solved!
Go to solution

Hi,

 

In my project I need to start couple VIs in the background and display them in a subpanel based on user interaction. There is only one subpanel so when I need to display a different subpanel I need to remove the current VI from the subpanel and insert the new one.

 

The problem I'm facing is that the VIs currently not shown in the subpanel should be aware that they are not in the subpanel to suspend some of their activities. Surely I can solve this problem in several ways (eg: using an FGV, or some sort of a user event), but as when I load a VI to a subpanel then its FP state changes to 'normal' (or maximized etc, so it changes to not 'closed') and when I unload a VI then FP state changes to 'closed' the easy way would be to capture this change as an event.

 

Is there a way to do that? If so what is it? If not what would be your recommendation to solve this problem?

 

Thanks.

0 Kudos
Message 1 of 4
(1,211 Views)

Hi 1984,

 


@1984 wrote:

If not what would be your recommendation to solve this problem?


Poll the FP state once a second and act upon it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,206 Views)
Solution
Accepted by topic author 1984

Are you asking about how to know if a running VI is in a subpanel?  A trick I found online once is to read the VI property Front Panel >> Resizable, then try to set that property to the same value.  If it returns error 1148 then it is in a subpanel.  The page online that showed this is now a dead link.

 

Example_VI_BD.png

Message 3 of 4
(1,161 Views)

@Hooovahh wrote:

Are you asking about how to know if a running VI is in a subpanel?  A trick I found online once is to read the VI property Front Panel >> Resizable, then try to set that property to the same value.  If it returns error 1148 then it is in a subpanel.  The page online that showed this is now a dead link.

 


Thanks, this is what I was looking for.

0 Kudos
Message 4 of 4
(1,082 Views)