LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to minimize a VI

I have Labview 8.5.1 running on XP. I have an application that has 2 top level VI. I want to minimize one of the VI to the tray upon execution. I have program the VI on the Windows run-time to run minimize and set the application build to use the VI properties on the run-time.
 
Under 8.2.1 this was adequate to do a minimize. Under 8.5.1 this no longer works. Am I doing something wrong or is this another feature of Labview 8.5.1?
0 Kudos
Message 1 of 14
(6,356 Views)
Hello Joseph,

You could minimize the VI programmatically by using the "Front Panel->Run-time Position->Minimized" method provided by an invoke node wired to the VI's reference. I've attached a sample VI that minimizes its front panel upon execution. The while loop is not necessary for this functionality, as it simply continues running until the stop button is clicked.

I hope that helps!
Brock
Applications Engineering
National Instruments
Message 2 of 14
(6,336 Views)
Did I missed the bug report that says my method no longer works? Is this to be the usual way I am suppose to operate from now on?
0 Kudos
Message 3 of 14
(6,324 Views)
Hello Joseph,

You should be able to do it either way: using VI properties (the method you described) or invoke nodes (the method I described).

I was able to successfully build an application with two VIs (one minimizes at runtime, one stays open) using the VI properties window as you described. When I run the built executable,  the VI I configured to minimize at run-time did in fact minimize, and the VI configured to remain opened stayed open. I am not able to replicate the problem on my system (LabVIEW 8.5.1 on Windows XP). Would you mind attaching a simple project which produces the problem?

I've attached the project I created in an attempt to recreate your problem. "minimize.vi" is configured to minimize at run time (no longer has the programmatic minimization method), "normal.vi" is configured to be centered at runtime. Please let me know how the built application behaves on your machine.

Thanks!
Brock
Applications Engineering
National Instruments
0 Kudos
Message 4 of 14
(6,311 Views)
I was surprised with Joseph's post.  I didn't see any change between LV8.2 & LV8.5.
 
RayR
Message 5 of 14
(6,298 Views)
I think it has to do with the conversion process of the project file. I started looking at some of the configuration settings. It is different from a built from scratch version. I am in the process of rebuilding the project file from scratch to see if it fixes the problem.
0 Kudos
Message 6 of 14
(6,284 Views)
Hello Joseph Loo,
 
I was able to replicate the problem, and have found a solution that works with an installer.  Instead of using an involk node, use a property node, and set Front Panel.state to minimized with a constant.  Hope this works for you.
 
Regards,
 
Benjamin Cook
Message 7 of 14
(6,278 Views)
It is definitely a conversion process. I rebuilt the project file from scratch. The second VI now runs minimize when I execute the program.
0 Kudos
Message 8 of 14
(6,271 Views)
We were unable to reproduce this here, do you think you could send us your project?
Regards,

Jeremy_B

Applications Engineer
National Instruments
0 Kudos
Message 9 of 14
(6,162 Views)
Do you want the project file or the entire project. If you are talking about the entire project, it is proprietary to the company.
0 Kudos
Message 10 of 14
(6,152 Views)