I have set up my exe so that the main UI interface and a background process run via the same EXO application, as follows:
- The user launches the EXO app via the Start menu, as per normal.
- When that app launches, the first thing it does is launch a second instance of the EXO app, using the command line to direct it to a specific page. The second instance is launched invisibly.
This means I only have one set of code regardless of whether I’m working on the UI interface or the background process, and can share common code easily, plus it makes the overall installation disk space smaller than having 2 separate .exe files.
I want to enable the tray icon, but only for the main UI instance, and not for the background process instance, but because they are the same .exe, I end up with two icons.
Is there any way to programatically hide the tray icon from within HEScript?
Any thoughts on this?
Thanks Guillaume, I thought that might be the case,
It can be done with HEScript. I’ll make some tests and post the results here.
Also, is it possible to change the icon used for the system tray, in the title bar, etc? I don’t want the “PHP” icon as that won’t mean anything to my customers.
The icon used is the one of the EXE file, so you have to change the icon of the EXE file: http://www.exeoutput.com/help/resources.htm
Thanks - I thought I’d seen something about changing the icon, but I couldn’t find it.
To hide the tray icon, try to use this HEScript command:
SetUIProp("spTrayIcon1", "IconVisible", "False");
To show the tray icon again, use this HEScript command:
SetUIProp("spTrayIcon1", "IconVisible", "True");
I would want minimize main window to tray (and back), is it possible?
P.S. Please update documentation, because “SetUIProp(“spTrayIcon1”, “IconVisible”, “False”);” isn’t into IconVisible(!).