Re: Programms in system tray

From: Rob Kennedy (.)
Date: 10/09/03


Date: Wed, 08 Oct 2003 17:40:53 -0500

muzzy wrote:
> I am just curious if there is a way to find a list of apps, which are
> shown in the system tray?

First, we should clear up some concepts. An application can't be "in the
system tray." A program can tell the OS to put an icon in the
notification area, but that has absolutely no effect on anything else. A
single program can put a dozen icons there. That program doesn't need to
have any visible windows of its own, and what windows it has don't need
to be minimized "to the tray," either. To learn more, read about the
Shell_NotifyIcon API function.

> If i go with GetWindow(hwnd, GW_HWNDNEXT),
> i get all the active windowed processes.

You should use the EnumWindows function instead. The documentation
explicitly warns against using GetWindow to enumerate the windows on the
system.

> I try to sort them using:
>
> WndStyle := GetWindowLong(hwnd, GWL_STYLE),
>
> but i don't know what value shoud be WndStyle to indicate that the app
> is in the tray.

Whether there is an icon in the notification area has nothing to do with
the style of any window. Windows and notification icons have no relation.

Anyway, back to your original question. No, there is no general way to
get any information about any of the icons in the notification area.
Even if there's an icon registered, it might not be visible since
Windows XP hides unused icons.

Take a look at TraySaver, a utility by Mike Lin. I works as its own
"system tray," displaying icons on its own window instead of letting
Explorer show them on the taskbar. The C source code is available, so
you might find some useful information there.

http://www.mlin.net/TraySaver.shtml

-- 
Rob


Relevant Pages

  • Re: Task Manager Not Displaying in System Tray More options
    ... MS-MVP Windows Shell/User ... Notification Area, but informally the System Tray. ... [[The area on the taskbar to the right of the taskbar buttons. ...
    (microsoft.public.windowsxp.general)
  • Re: sys tray
    ... > how do I get items out of the systray like speech tools and windows ... First of all, you should be concerned, not with what icons appear in the ... system tray, but with *all* the programs that start automatically when you ...
    (microsoft.public.windowsxp.general)
  • Re: Task Manager Not Displaying in System Tray More options
    ... of Windows it was called the system tray. ... Notification Area, but informally the System Tray. ... [[The area on the taskbar to the right of the taskbar buttons. ...
    (microsoft.public.windowsxp.general)
  • RE: Power Notification Icon gone after Windows Updates (Vista)
    ... out selections for notification area. ... Windows Vista Business on Dell Inspiron with AMD Turion 64X2 TL-56. ... "Notification Area" tab, the clock icon is still selected, but the Volume, ... and Power icons are greyed out and can no longer be selected. ...
    (microsoft.public.windowsupdate)
  • Re: I need to disable the system tray completely
    ... I have a client who wants to completely remove the system tray from the windows shell... ... I have already locked it down as much as I can with group policy, but they have some programs that run in the system tray that they don't want the users to know about.... ... This setting affects the notification area on the taskbar. ... The notification area is located at the far right end of the task bar and includes the icons for current notifications and the system clock. ...
    (microsoft.public.windowsxp.customize)