LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot mimimize window programmatically

Solved!
Go to solution

I just discovered a "feature" of LabVIEW (2015, if it matters) that I'm not sure is one with which I agree.

I found that I cannot programmactically minimize a VI's front panel window if:

 

     VI Properties --> Window Appearance --> Custom --> Allow user to minimize window        box is not checked. 

 

I guess I prefer to draw a distinction between what the programmer is allowed to do versus what the programmer wants to allow the user to do.   Is this an unreasonable request?

0 Kudos
Message 1 of 3
(3,856 Views)
Solution
Accepted by topic author WNM

You know, I didn't believe what you said, but wrote a little LabVIEW demo (in 2015) and proved it to myself.  But that also gave me the "fix".  Before trying to minimize the window (which I presume you are doing by the Invoke Node FP.Open, State = Minimized), get the FP.Minimizable Property and then set the FP.Minimizable Property to True.  Now you can Minimize, and subsequently bring it back by calling FP.Open with default inputs, following which you again set FP.Minimizable to the original value you got from the first "Get".

Mini VI.png

Note that this works whether or not the VI has "Allow User to Minimize" set or not.  Of course, if it is not set, then all the calls to FP.Minimizable aren't needed ...

 

Bob Schor

Message 2 of 3
(3,825 Views)
Solution
Accepted by topic author WNM

Yep.  I came to the same conclusion and the same fix, though using a subVI that does it all on behalf of the calling VI.  I've attached that subVI (saved to 2011) on the off chance that someone else might find it useful.  Thanks for the confirmation of the "feature".

Message 3 of 3
(3,775 Views)