03-23-2023 12:13 PM
Is it possible to write an application in LabVIEW (2020+) with a hidden panel that will not flash at launch after being compiled to exe?
Let's assume that my application can be run as an exe with or without the front panel (it starts without FP and at some point, it might be displayed). Is it possible to use some tricks to make the application window not flash at startup? I know many have already tried this. That you can change the state to "hidden", make a transparent background, etc., but the application window always flash for a fraction of a second.
Hence my question: is it possible to make this window not blink at startup and also appear later when it is needed? Is it technically possible in LabVIEW?
03-23-2023 12:58 PM
I can't help you with starting up without any flashing (hopefully someone else can chime in) but you could always use a splash screen. Just a simple VI that launches your main VI and shows a logo, or a Welcome message, or something like that.
That can be helpful if your user is clicking something to start the program. It gives visual feedback that the program has started up. Of course, you may not want that if, for example, you're launching this second program automatically somewhere.
03-24-2023 12:54 AM
If you have Fast File Format enabled, it will always flicker, see this discussion.
03-24-2023 03:09 AM - edited 03-24-2023 03:18 AM
Setting the transparency to 100% (in VI Properties>Window Appearance<Customize...) does seem to work.
IIRCF, LV actually hides the window if you set it to 100% (you won't get events or be able to register dynamic control events). The FP.state property does return Standard though. I often had to set it to 99%.
But in an exe, it does seem to prevent the splash of the top level VI.. Iff fast file format is off.
03-24-2023 03:51 AM
I have "use fast file format" unchecked and the flicker remained.
Perhaps it should be a combination of multiple different settings?
03-24-2023 04:08 AM
@bienieck wrote:
I have "use fast file format" unchecked and the flicker remained.
Perhaps it should be a combination of multiple different settings?
Did you set the transparency to 100%?
03-24-2023 05:02 AM
The Splash screen is the solution to that problem in my case. My Splash screen is a fairly simply VI (although it has some trickery build in so that I can also launch it as About screen during application run).
It's set as the startup VI in a project, opens the application ini file to read some settings from it and then launches the real GUI application front panel. After that it sits in a loop and polls the state of the GUI front panel, showing some activity progress while looping in there. Once it sees that the GUI front panel has been made visible. It stops and closes itself.
The GUI itself is programmed to start up in hidden mode but opens right away a reference to itself. This makes sure that it stays in memory even if the Splash Screen launcher is for some strange reason aborting itself. Then it initializes whatever it needs to initialize and as one of the last things in its initialization sequence it makes itself visible through the FP.Open method.
Unless you try to start this up on a rather old and underpowered PC, there should be no noticeable flickering.
03-24-2023 08:37 PM
I tried with 100% transparency. It doesn't work.
Splash screen could be a solution but it is not the answer to my question.
What is more, imagine seeing splash screen each time you run, for example, ping from the cmd. It would be ridiculous.
So, once again, is it technically possible to start LabVIEW-based exe with hidden FP without flickering?
03-24-2023 10:37 PM
So far I have never come across someone who has reliably and successfully launched an LV application hidden, after many unsuccessful attempts, we resort to a splash screen and call it a feature than a bug.
03-25-2023 05:25 AM - edited 03-25-2023 05:26 AM
So basically you want a sort of command line tool but without command line window either? That really strikes me as the proverbial hammer to drive a screw in.
Not only is Windows process creation already rather slow compared to the same on Linux for instance but you also add the startup time and memory load of the LabVIEW runtime and maybe to add insult to injury also add a little .Net in there since everything is still not loading slow enough?