Page 1 of 1

Minimize to System Tray or TSR

Posted: Tue Jul 14, 2015 7:00 pm
by carelvos
As the topic suggest, I would like to know how to minimize to Windows's system tray, or just hide my app from the taskbar but keeps running.

Thanks,

Carel

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 8:33 am
by MaxV
Here find your solution: http://www.sonsothunder.com/products/st ... tstray.htm
The demo to try is free.

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 8:38 am
by carelvos
Thanks MaxV, but I've been to that page already.

Is there no way you can do this in livecode? - I've done this ages ago in VB6!

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 2:28 pm
by MaxV
STSTray is for Livecode and made in Livecode.
However if you want to create your personal code, you should read this: http://livecode.wikia.com/wiki/Working_with_DLL

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 2:44 pm
by MaxV
You can also use this code:

Code: Select all

do "myVbscript" as "VBScript" 

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 4:30 pm
by FourthWorld
carelvos wrote:...or just hide my app from the taskbar but keeps running.l
Have you considered the "hide" command? You could call "hide this stack" in a preOpenStack or preOpenCard handler.

You can also use the startUpIconic stack property.

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 7:18 pm
by jacque
Another trick is that if the stack isn't a toplevel stack it won't show in the task bar. Modeless stacks behave almost identically to toplevel stacks in most respects, so that may be an option. I'm not on a Windows OS right now so I can't check, but if modeless doesn't work, I know palettes do.

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 8:04 pm
by carelvos
Thanks for everyone's input. FourthWold: I presume "hide this stack" would work on a Hide button as well, and if I put a checkbox "Do not show this again" (and save settings somewhere in an ".ini" file) and call it from preOpenStack it would work?

Could I assign a hotkey to unhide the stack again - Just so the user knows the program is running? (I haven't bothered searching, just thought of it at this moment)

Many thanks,

Carel

Re: Minimize to System Tray or TSR

Posted: Wed Jul 15, 2015 9:52 pm
by SparkOut
http://forums.livecode.com/viewtopic.ph ... hilit=tray may be useful. If you set the system tray icon, and change the windowshape or delete the "decorations" of the stack title bar, then iconify it should show you the programming is running with the system tray icon, but without a taskbar icon. You can uniconify on choosing an option from the system tray icon menu.