Minimize to System Tray or TSR

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
carelvos
Posts: 19
Joined: Tue Jul 14, 2015 5:21 pm

Minimize to System Tray or TSR

Post by carelvos » Tue Jul 14, 2015 7:00 pm

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

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Minimize to System Tray or TSR

Post by MaxV » Wed Jul 15, 2015 8:33 am

Here find your solution: http://www.sonsothunder.com/products/st ... tstray.htm
The demo to try is free.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

carelvos
Posts: 19
Joined: Tue Jul 14, 2015 5:21 pm

Re: Minimize to System Tray or TSR

Post by carelvos » Wed Jul 15, 2015 8:38 am

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!

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Minimize to System Tray or TSR

Post by MaxV » Wed Jul 15, 2015 2:28 pm

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
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Minimize to System Tray or TSR

Post by MaxV » Wed Jul 15, 2015 2:44 pm

You can also use this code:

Code: Select all

do "myVbscript" as "VBScript" 
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Minimize to System Tray or TSR

Post by FourthWorld » Wed Jul 15, 2015 4:30 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7391
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Minimize to System Tray or TSR

Post by jacque » Wed Jul 15, 2015 7:18 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

carelvos
Posts: 19
Joined: Tue Jul 14, 2015 5:21 pm

Re: Minimize to System Tray or TSR

Post by carelvos » Wed Jul 15, 2015 8:04 pm

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

SparkOut
Posts: 2945
Joined: Sun Sep 23, 2007 4:58 pm

Re: Minimize to System Tray or TSR

Post by SparkOut » Wed Jul 15, 2015 9:52 pm

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.

Post Reply