NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
andrej
Posts: 196
0 Kudos
Accepted Solution

Minimizing the application (all open windows)

Hi,

 

I have an application that has more windows (W1, W2, ..., Wn) where W1 calls W2, W2 calls W3 and so on (when Wn is open Wn-1 can not be accessed). I want to minimize all windows when user minimizes Wn. How can I do this? I could use references to all previous windows and minimize them using invoke node, but I don't like this method. Is there any other way to do this? Maybe on the application level?

 

Thanks! 

Active Participant zou
Active Participant
zou
Posts: 1,977
0 Kudos

Re: Minimizing the application (all open windows)

If you are using MS Windows, you can use Windows API to do this.

Just find the "labview" window, and minimize it.  All LabVIEW windows will be minimized.

 

Member
andrej
Posts: 196
0 Kudos

Re: Minimizing the application (all open windows)

How can I find "labview" window or all labview windows. I have tried minimizing using the VI name, but it minimizes only the top window, other labview windows are not minimized.

Trusted Enthusiast
TiTou
Posts: 2,820
0 Kudos

Re: Minimizing the application (all open windows)

Hi

 

I have an app that has more than one front panel open at the same time, it does create some issues somtimes, for instance when you "alt-tab" through the open windows in Windows.

To minimize all my Vi's front panel at the same time, there is a button on the main VI, when the user hits it I use this VI (attached) to minimize all the opened FP.

 

I'm sorry it's not documented, but basically you have to place it in the main VI of your app and pass in the ref of the main VI, when run, it take take the ref of all the VIs in memory that have their front panel open, minized all of them and old their ref in  the array that's in a shift register and then it wait for the main VI to be opened by the user and then re-displays all other FP that were opened.

 

Hope this helps

_______________________________________________________________________
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Member
andrej
Posts: 196
0 Kudos

Re: Minimizing the application (all open windows)

Thank you. Actually I did similar VI, but I was hoping that there is some other solution where I don't need to pass a parent VI reference to a subVI.

Active Participant
pcardinale
Posts: 345
0 Kudos

Re: Minimizing the application (all open windows)

What's wrong with doing it per VI?

Min_Wins.png

Trusted Enthusiast
TiTou
Posts: 2,820
0 Kudos

Re: Minimizing the application (all open windows)

Well I don't know how Andrej's application is architectured but is he has independant processes that have different FP and if he want to minimizse all the app's FP when one of them is minimized he can't use your VI.

Maybe your VI would be fine... I just posted the VI I'm using for my project in case it can help :smileywink:

_______________________________________________________________________
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"