LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I hide the main front panel when I run from the executable?

Hopefully this is an easy question. I have an application where the front panel is not the main GUI and I would like to hide it when the program runs, but only when it runs from the executable. How can I do this?

0 Kudos
Message 1 of 11
(5,514 Views)

Their are two places that you can change the way a front pannel window acts for VIs in your project. For the .EXE you can find these settings under Right Click: Build Specifications, New,Create Exe, --->Source File Settings, Customize VI Properties.Make sure show front pannel when called is unchecked.

 

For your subVI when you run out of the VI you have to set it to open the front pannel when called is checked in the following setting area. Right click the subVI on your project file list. Go to Window appearance, CLICK customize. Make sure Show front pannel when called is checked

 

 


0 Kudos
Message 2 of 11
(5,503 Views)

I tried the first option and it doesn't work. The second option will not work either because it is the main vi that I'm trying to hide and not a subvi. Is there any property or method that I can use to hide the current front panel?

0 Kudos
Message 3 of 11
(5,485 Views)

You can set the FP.State to "Minimized" when the app starts up.

 

Just a simple question: If you hide the front panel, then how is a user supposed to exit?

 

Are you perhaps looking to create a service?

0 Kudos
Message 4 of 11
(5,478 Views)

I found the following KB suggesting a solution to your issue. Tell me how it goes.

 

AE KB 4T13ST3L

search KBs with www.ni.com/kb

 

http://digital.ni.com/public.nsf/allkb/FA3C9904B09060AA86257532003A51B4

 


0 Kudos
Message 5 of 11
(5,476 Views)

The diagram is missing as well as the png attachment.

0 Kudos
Message 6 of 11
(5,463 Views)

 


@Steve Block wrote:

The diagram is missing as well as the png attachment.


 

That's because this YET ANOTHER KB ARTICLE THAT HAS LINKS TO ae.natinst.com, WHICH CANNOT BE SEEN FROM THE OUTSIDE WORLD. WHEN WILL NI FIX ALL THESE KB ARTICLES????!!!!

 

Note: I am shouting at NI, not you.

Message 7 of 11
(5,457 Views)

Yeah, seems to be a common PITA.

 

It would probably look like this:

23124i7809A06DEA0EDC46

EDIT:  BTW, you can do this with a property node but I think the Invoke node is the preferred method (Smiley Very Happy  Ha!)

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 8 of 11
(5,447 Views)

 


@NIquist wrote:

23124i7809A06DEA0EDC46


 

Yeah, don't do that. Executables built in LV require at least one front panel to be open. If it isn't, the run-time engine automatically closes the executable. I haven't checked recently, but I assume this is still the case.

 

Instead, you can set the FP state to minimized (as suggested earlier) or (better) to hidden.

 

P.S. one side point - the property and invoke nodes have a shortcut - if you use the Application or VI classes and don't connect a reference, they default to the current app or VI. That means you don't have to open the reference.


___________________
Try to take over the world!
0 Kudos
Message 9 of 11
(5,387 Views)

sorry, i am not familiar with the methods proposed above, but as far as i understand, you have your main front panel and another frontpanel that is called at the start of your program, and you want the second front panel to be hidden? dont know if this works with the methods suggested, but i would use the "current vis path" which points to the exe file in the case of a compiled application. so you can distinguish between exe and vi and handle this in your program by the property nodes of the front panel as you like (minimized, visible...)


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 10 of 11
(5,376 Views)