Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

system tray

 [1/7] from: gchiu::compkarori::co::nz at: 28-Oct-2002 20:53


Anyone have an idea as to how to setup an application that sits in the system tray? Does access to the system port in windows allow this? -- Graham Chiu

 [2/7] from: greggirwin:mindspring at: 28-Oct-2002 9:29


Hi Graham, << Anyone have an idea as to how to setup an application that sits in the system tray? Does access to the system port in windows allow this? >> You need to use the Shell_NotifyIcon API and, yes, catch messages via the system port. In addition, since the tray only uses icons as images, you need to create the icons somehow, maybe with CreateIconFromResource, ExtractIconEx, or some other method. I haven't tried it, so I don't know what snags you might run into. --Gregg

 [3/7] from: g:santilli:tiscalinet:it at: 28-Oct-2002 19:24


Hi Gregg, On Monday, October 28, 2002, 5:29:49 PM, you wrote: GI> I haven't tried it, so I don't know what snags you might run into. /Link puts itself on the system tray, so maybe there's some function hidden somewhere that does all the job for us. ;-) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [4/7] from: gchiu:compkarori at: 29-Oct-2002 7:38


Hi Gregg,
>You need to use the Shell_NotifyIcon API and, yes, catch >messages via the >system port. In addition, since the tray only uses icons
Okay, that's a bit beyond me at the present. I'll defer that task till I've finished the rest of my app. -- Graham Chiu

 [5/7] from: gchiu:compkarori at: 29-Oct-2002 8:46


On Mon, 28 Oct 2002 19:24:09 +0100 Gabriele Santilli <[g--santilli--tiscalinet--it]> wrote:
>/Link puts itself on the system tray, so maybe >there's some >function hidden somewhere that does all the job for us. >;-) >
Hi Gabriele, I was thinking exactly the same thing :) I wonder if anyone at RT has time to disclose this little secret for us. -- Graham Chiu

 [6/7] from: greggirwin:mindspring at: 28-Oct-2002 13:33


<< I was thinking exactly the same thing :) I wonder if anyone at RT has time to disclose this little secret for us. >> It's not too hard to do, really, but there are some details to consider. The icon issue is one, what you do in response to a message is another. If you want to show a layout, then do you need to use the API to get the cursor position? If you want to display a popup menu, do you use a native REBOL layout approach, or do you use CreateMenu+TrackPopupMenu? If the latter, then you need to catch the messages for the commands you put on the menu as well. There is only one tray icon API call to worry about. You use parameters/flags and a structure to tell it what to do (add, modify, remove icon) and then respond to the incoming messages. --Gregg

 [7/7] from: ptretter:charter at: 29-Oct-2002 7:51


Don't know much about it but found this article. Might be useful for /Pro. http://www.codeproject.com/shell/trayicons.asp Paul Tretter