09-03-2010 08:37 AM
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?
09-03-2010 08:51 AM
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
09-03-2010 09:12 AM
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?
09-03-2010 09:26 AM
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?
09-03-2010 09:28 AM
I found the following KB suggesting a solution to your issue. Tell me how it goes.
search KBs with www.ni.com/kb
http://digital.ni.com/public.nsf/allkb/FA3C9904B09060AA86257532003A51B4
09-03-2010 09:55 AM
The diagram is missing as well as the png attachment.
09-03-2010 10:05 AM
@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.
09-03-2010 10:10 AM - edited 09-03-2010 10:13 AM
Yeah, seems to be a common PITA.
It would probably look like this:
EDIT: BTW, you can do this with a property node but I think the Invoke node is the preferred method (
Ha!)
09-04-2010 01:36 PM
@NIquist wrote:
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.
09-04-2010 03:45 PM
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...)