System Tray Icon Quality Issue


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: System Tray Icon Quality Issue

  1. #1
    Joe Lachoff Guest

    System Tray Icon Quality Issue


    Hi,
    I'm creating icons for a module of our software that can be accessed from
    the system tray, and I'm finding that it's impossible to create a system
    tray icon in a form that Windows doesn't change in some way from my original
    design when it's displayed in the system tray area. In each case my display
    has been set to true color, and I've also test 256 color mode.

    My first attempt was a single 16x16 pixel, 256 color resource. It didn't
    use the standard Windows palette. When I analyzed the display I found that
    Windows had re-assigned it to the 16-color palette and remapped the pixels.

    Then I went back and re-drew the icon using the standard 16-color palette.
    Still, when installed into our executable, the colors got all shifted around
    and the icon looked bad. Notable, however, was the fact that the very same
    icon looked fine in the Windows explorer view and in the Task bar.

    Finally, I created a full suite of Windows icon resources: 16x16, 32x32,
    and 48x48, each in three pixel depths: 16 colors (standard), 256 colors (standard)
    and true color. The problem persisted.

    I then started to experiment with icon resources from other executables on
    my machine that successfully install icons in the system tray. I found that
    I could copy and paste their icons into our executable, but when I do so,
    the system tray icon becomes completely invisible! (While still showing up
    in the Windows Explorer).

    Our programming group is stumped, we've all scoured MSDN for information
    about the proper voodoo to make this icon in a way that the system tray won't
    mutilate, to no avail. I'm convinced that there's some sort of flag to set
    elsewhere, or maybe a little-known palette trick or some kind of obscure
    rule or, maybe just a magical incantation, (although that would be a real
    let down).

    Any help you might be able to provide would be greatly appreciated. Thanks
    in advance.

    Cheers,

    -Joe Lachoff
    joe@equill.com

  2. #2
    Karl E. Peterson Guest

    Re: System Tray Icon Quality Issue

    Hi Joe --

    Boy, that's really odd. I've had *no* trouble, whatsoever, using any icon I've
    tried. They've all been very plain, typically created with IMAGEDIT.EXE (comes with
    the SDK). I usually define the 16x16 resource first, followed by the 32x32 resource,
    for cases like this. Not sure if that's superstition, or not? <g>

    At any rate, I've got a sample (Tray.zip) on my site, if you'd like to see how I've
    done it. Now that I go revisit it, I see that uses a simple 32x32/16-color ICO. Go
    figure. Perhaps you're trying to get too fancy?

    Later... Karl
    --
    http://www.mvps.org/vb


    "Joe Lachoff" <joe@equill.com> wrote in message news:3a3a7465$1@news.devx.com...
    >
    > Hi,
    > I'm creating icons for a module of our software that can be accessed from
    > the system tray, and I'm finding that it's impossible to create a system
    > tray icon in a form that Windows doesn't change in some way from my original
    > design when it's displayed in the system tray area. In each case my display
    > has been set to true color, and I've also test 256 color mode.
    >
    > My first attempt was a single 16x16 pixel, 256 color resource. It didn't
    > use the standard Windows palette. When I analyzed the display I found that
    > Windows had re-assigned it to the 16-color palette and remapped the pixels.
    >
    > Then I went back and re-drew the icon using the standard 16-color palette.
    > Still, when installed into our executable, the colors got all shifted around
    > and the icon looked bad. Notable, however, was the fact that the very same
    > icon looked fine in the Windows explorer view and in the Task bar.
    >
    > Finally, I created a full suite of Windows icon resources: 16x16, 32x32,
    > and 48x48, each in three pixel depths: 16 colors (standard), 256 colors (standard)
    > and true color. The problem persisted.
    >
    > I then started to experiment with icon resources from other executables on
    > my machine that successfully install icons in the system tray. I found that
    > I could copy and paste their icons into our executable, but when I do so,
    > the system tray icon becomes completely invisible! (While still showing up
    > in the Windows Explorer).
    >
    > Our programming group is stumped, we've all scoured MSDN for information
    > about the proper voodoo to make this icon in a way that the system tray won't
    > mutilate, to no avail. I'm convinced that there's some sort of flag to set
    > elsewhere, or maybe a little-known palette trick or some kind of obscure
    > rule or, maybe just a magical incantation, (although that would be a real
    > let down).
    >
    > Any help you might be able to provide would be greatly appreciated. Thanks
    > in advance.
    >
    > Cheers,
    >
    > -Joe Lachoff
    > joe@equill.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center