Thoric Posted June 28, 2017 Report Share Posted June 28, 2017 (edited) 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? Edited June 28, 2017 by Thoric Quote Link to comment
Tim_S Posted June 28, 2017 Report Share Posted June 28, 2017 1 minute ago, Thoric said: I want this VI to be running in the background without any tray icon, how can I get my VI to run invisibly? Put the entry "HideRootWindow=True" into the ini file for the executable. 2 Quote Link to comment
hooovahh Posted June 28, 2017 Report Share Posted June 28, 2017 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. Quote Link to comment
smithd Posted June 28, 2017 Report Share Posted June 28, 2017 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. Quote Link to comment
Tim_S Posted June 28, 2017 Report Share Posted June 28, 2017 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. Quote Link to comment
hooovahh Posted June 28, 2017 Report Share Posted June 28, 2017 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. 2 Quote Link to comment
Thoric Posted June 29, 2017 Author Report Share Posted June 29, 2017 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. Quote Link to comment
Thoric Posted June 29, 2017 Author Report Share Posted June 29, 2017 (edited) 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 June 29, 2017 by Thoric Quote Link to comment
mabe Posted July 4, 2017 Report Share Posted July 4, 2017 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. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.