10-18-2023 09:55 AM
Hi, I built an application (.exe) from a .vi which I set the FP.State as Hidden within the block diagram.
With the block diagram open (.vi form), I am able to view the front panel after it is hidden with Ctrl-E, however I cannot view the application once it built as a .exe.
Is there a way to view/unhide the application (.exe) after it is hidden?
Solved! Go to Solution.
10-18-2023 10:04 AM
What about minimizing the front panel on startup instead of hiding it?
10-18-2023 10:13 AM
Intent is to run the application in the background and not allow users to view the application while it is running.
Minimizing it means anyone can just click to maximize the window.
Hiding it seems like a good option.
10-18-2023 10:30 AM - edited 10-18-2023 10:32 AM
Why would you want to unhide it if you intend to hide it?
If you want to allow some users to have some "backdoor action", you could use an INI file to decide if you want to hide the front panel on startup.
Combining a User-Created .ini File with LabVIEW.ini for Distribution
Another method is to use the VI Serve. See Get Access To A Running Executable From Another VI or Executable Through VI Server
10-18-2023 10:49 AM
You have to explicitly program the state of the FP to change based on some user action (think event structure).
I've got an application that I do this with. The top level VI has some diagnostic information that I need access to on occasion, but the main GUI that the test operator typically uses is a sub-VI that pops-up when it is called.
-Dave
10-18-2023 11:46 AM
Hi,
Here is an example to emulate the behavior of ctrl+E that works for a hidden VI:
However keep in mind that it will listen and respond to key events during the entire execution of the VI, not just when you need it. So this may show the panel even when you are using another application and accidentally press ctrl+E. If the application really should be "hidden", then you rather choose a combination of keys that you are highly unlikely to press accidentally while doing something else (example replace key "E" by key "F1").
Regards,
Raphaël.
10-18-2023 04:58 PM
I have previously used the NotifyIcon addon to manage "hidden" windows:
https://forums.ni.com/t5/Example-Code/Icon-in-Windows-system-tray-with-LabVIEW/ta-p/3497972
This puts something in the system tray, so there isn't a minimized window to click on in the taskbar, but also allows the users to be aware that the program is running and have a small right-click menu to use as needed.
I feel this is a lot better option that relying on rare key combinations to show the window if needed. If there's something that you want to be able to do but not let standard users do, you can put that functionality behind a password or some other form of ID check.
10-30-2023 06:08 AM
Thank you for this recommendation.
With the icon in the system tray, do I still need to hide the front panel window?
10-30-2023 09:30 AM
@Sable wrote:
Hi, I built an application (.exe) from a .vi which I set the FP.State as Hidden within the block diagram.
With the block diagram open (.vi form), I am able to view the front panel after it is hidden with Ctrl-E, however I cannot view the application once it built as a .exe.
Is there a way to view/unhide the application (.exe) after it is hidden?
Because the FP of your application is hidden you have no means for your user to interact with that panel or even getting focus on the panel through the RTE by itself.
The LabVIEW IDE holds references to VIs in memory and let's you interact with the FP.state property though its own means.
FP.State is runtime writable and available in the RTE. You would need a similar means to obtain a reference to the hidden exe panel and programmaticly set the FP.State property through a panel that the user can interact with. You COULD probably do that with a Daemon service in the system tray (like connecting to a WiFi Hotspot, etc...)
However, I would first rethink why I even built an application that no user normally interacts with. Then go back to my intended Users and write a "User Story" about how THEY want to work with the application you are developing for them. I will bet you that their story and your current UI have little in common.
10-30-2023 06:40 PM
Thanks Jay.
The top level VI has some diagnostic information that I ONLY need access to on occasion, but the main GUI that the test operator typically uses is a sub-VI that only pops-up when it is called.
In order to avoid users from accessing the top level VI, I want to hide the front panel.
So by having an icon in the system tray, I am aware that the program is running and have a small right-click menu to maximize the window when needed.