Jump to content

Executable not hidden


Recommended Posts

This quick test VI, when run in the dev env, immediately hides its front panel and the taskbar item for it disappears too, then two seconds later it sounds the PC beep, then closes itself an additional second later. The beep is purely there so that I know the VI is still running and not quit out.

This hidden front panel is the behaviour I want for my VI. But when I build an executable from it and run it, the item in the Windows Task Bar remains. It's there for the duration (three seconds), then vanishes when the VI closes.

So, why does the built executable cause a visible taskbar item to show (like most standard Windows applications have), but not when in the dev env?

And more importantly, since I want this VI to be running in the background without any tray icon, how can I get my VI to run invisibly?

not_hidden_exe.png

Edited by Thoric
Link to comment

Yup Tim is right.  If you do this often you may want to either specify a custom configuration file in the application builder for your EXE (with this INI set) or you can make a post build VI that sets this INI tag in the built EXE after it is built.

And if you are trying to hide your program in the system tray I highly recommend this set of code posted on LAVA a while ago.  It is the most feature complete, and well done API I've found.

Link to comment
20 minutes ago, Tim_S said:

Put the entry "HideRootWindow=True" into the ini file for the executable.

For windows you wish to hide, I believe you also have to disable allow users to minimize window. That may not be the case if the window itself is set to hidden.

Link to comment
16 minutes ago, hooovahh said:

And if you are trying to hide your program in the system tray I highly recommend this set of code posted on LAVA a while ago.  It is the most feature complete, and well done API I've found

I believe the Averna Notifyicon in the LabVIEW Tools Netowrk is based on that and seems a bit cleaner to me.

1 minute ago, smithd said:

I believe you also have to disable allow users to minimize window.

My top level VI does not maximize, so I can't speak to that at the moment. I have subVIs that provide user interface which can maximize with no issues.

Link to comment
15 minutes ago, Tim_S said:

I believe the Averna Notifyicon in the LabVIEW Tools Netowrk is based on that and seems a bit cleaner to me.

Neat I didn't realize that it had been updated and rebranded.  Of course the one I linked to has a BSD license, while the Averna has a custom license that seems a but odd, like the Restrictions section states "you may not...disassemble the Software or merge the Software into any other software, or otherwise attempt to discover the source code."  Does pressing CTRL+E count as discovering the source code?  It isn't password protected.

But the inclusion of the RTM functionality, and multiple icons is useful.

  • Like 2
Link to comment

Thanks everyone. I'll use this approach.

I am indeed using the Averna notification icon toolkit, which is why I wanted no task bar item to show for the application.

So does anyone have an explanation as to why the VI behaves differently in the dev env compared to when built? I hate it when things change just because you build your code into an exe. Some things, like paths, are understandable, but visual behaviour changes are unacceptable to me.

Link to comment

It didn't work! Here is the ini file, alongside the exe:

[DWJar]
server.app.propertiesEnabled=True
server.ole.enabled=True
server.tcp.paranoid=True
server.tcp.serviceName="My Computer/VI Server"
server.vi.callsEnabled=True
server.vi.propertiesEnabled=True
WebServer.TcpAccess="c+*"
WebServer.ViAccess="+*"
DebugServerEnabled=False
DebugServerWaitOnLaunch=False
HideRootWindow=True

Any clues as to why my front panel still showed? It wasn't hidden or minimised, it was fully visible and on screen.

I've also set "Allow User to Minimise Window" to disabled in the VI Properties, as indicated by smithd

 

OK - my bad. I thought the ini key worked on it's own, so I'd disabled the property nodes for hiding the Front Panel. I put that back in and it's working :-) Thanks!

Edited by Thoric
Link to comment

Just a little clarification.

The Averna NotifyIcon is surely inspired by the same NI example found on ni.com but it is not a rebranded/repackaged version of the Stinus Olsen library posted on LAVA. I've made the Averna implementation as an internal reuse library a long time ago. It was posted few years later on the LV Tool Network.

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.