Page 1 of 1
Minimize to system tray.
Posted: Thu Oct 23, 2008 3:02 pm
by Paul D
I found this...
http://article.gmane.org/gmane.comp.ide ... ystem+tray
but that doesnt work. (does it work for anyone else?)
is it possible to minimize your standalone to the system tray. if not, is there a work around?
Posted: Fri Oct 24, 2008 5:51 am
by Janschenkel
Hi Paul,
It's difficult to determine what went wrong without checking he code - could you post a basic script that doesn't get the desired effect?
I'm sure we can figure it out together
Jan Schenkel.
Posted: Fri Oct 24, 2008 2:39 pm
by Paul D
sure, here is what i tried. i interpreted the link information above to just set an icon for your stack then set it to palette and you should have an icon in the system tray. so...
I set the icon of the stack then set it to palette...
set the icon of this stack to 1017
palette this stack
(also tried setting the palette first then the icon)
all that does is remove the window from my taskbar. no icon appears in the system tray. i also tried setting the icon to a image that came with revolution and one that i added via the image library. so i thought maybe i have to minimize the palette stack with the icon set...
if i minimize the palette stack with... "set the iconic of this stack to true"
This minimizes the program above my start button but I cant restore it.
As you can see, restore is disabled. So is the maximize button. Double clicking the window does nothing and all I can do at this point is close the program.
I tried the same thing with modeless, no avail.
I would like to remove the window from my taskbar (which palette does) and put an icon in the system tray for my program next to outlook and my time, etc...

Posted: Fri Oct 24, 2008 2:56 pm
by Klaus
Hi Paul,
sorry, looks like a misunderstanding!
From the docs about "icon":
Cross-platform note: On OS X systems, a stack's icon is displayed in the dock when the stack is minimized.
On Unix systems, the stack's icon is displayed on the desktop when the stack is iconified.
!!!!!
Setting a stack's icon property has no effect on Mac OS and Windows systems.!!!
!!!!!
In other words you cannot put a stack into the Windows tray with the build in capabilities of Rev.
Hope that helps.
Best
Klaus
Posted: Fri Oct 24, 2008 3:21 pm
by Mark
Hi Paul,
Create a new stack. Call the stack "System Tray Sample". Add an image object with a 32x32 px picture and add a button. Set the ID of the image object to something unique, say 21006. Set the name of the button to "Backscript".
Set the script of the card to
Code: Select all
on preOpenStack
insert the script of btn "Backscript" into back
end preOpenStack
on unIconifyStack
show this stack
set the icon to 0
pass unIconifyStack
end unIconifyStack
on iconifyStack
send "hideme" to me in 0 millisecs -- bug 7531
set the icon to 21006
set the iconMenu to "Show Me|Show Me"
pass iconifyStack
end iconifyStack
on hideMe
hide stack "System Tray Sample"
end hideMe
Set the script of the button "Backscript" to
Code: Select all
on iconMenuPick theItem
set the iconic of stack "System Tray Sample" to false
end iconMenuPick
This solution takes care of
bug 7351. Be aware of
bug 7350.
I have uploaded the stack to RevOnline, user name Mark.
Best,
Mark
Posted: Fri Oct 24, 2008 4:05 pm
by Paul D
Klaus wrote:Hi Paul,
sorry, looks like a misunderstanding!
From the docs about "icon":
Cross-platform note: On OS X systems, a stack's icon is displayed in the dock when the stack is minimized.
On Unix systems, the stack's icon is displayed on the desktop when the stack is iconified.
!!!!!
Setting a stack's icon property has no effect on Mac OS and Windows systems.!!!
!!!!!
In other words you cannot put a stack into the Windows tray with the build in capabilities of Rev.
Hope that helps.
Best
Klaus
hmm... you are right. i just assumed icon did something in windows in reference to the gmane link and the fact that is says All Platforms and platform support has the Windows Logo in the dictionary list and i didnt read all of the comments. oh well...
Thanks Mark I will check out your example.
Posted: Fri Oct 24, 2008 4:41 pm
by Paul D
Mark,
the example works fantastic.
how come you send hideme to itself? also, iconmenu is undocumented?
thanks again.
Posted: Fri Oct 24, 2008 5:14 pm
by Mark
Hi Paul,
The hideMe handler is a workaround for a bug. The iconMenu is "un"-documented in the Read Me files that come with Revolution.
Best,
Mark
Posted: Fri Oct 24, 2008 9:55 pm
by paul_gr
Thanks Mark,
that's brilliant.
I thought there was no way to do this in Rev.
Paul
Posted: Sun Dec 28, 2008 3:29 pm
by maarten.koopmans
This is what I'm looking for as well, but I can't seem to create a nested menu.
Any thoughts/help appreciated!
--Maarten
Posted: Tue Mar 03, 2009 7:01 am
by RRobert
Is there a way how I could get the iconmenu by a left click?
Robert
Posted: Tue Mar 03, 2009 10:31 am
by Mark
Maarten,
It is possible to create a nested menu, but you need to use tabs and tags. Make sure to read the documentation in the Read Me files included with Revolution. It is under the header "Unsupported".
Btw, do you know about the
Dutch Revolution forum?
Robert, I don't think there is a way to activate the icon menu on left-click. I wish I had this possibility, because currently I'm having some trouble with the icon menu. When I right-click on the icon menu, it shows the task bar menu as well as Revolution's icon menu, which is definitely not what I want.
Best,
Mark