Results 1 to 8 of 8

Thread: [RESOLVED] System Tray Icon Goes Black After Standby Mode

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Hassan Basri's Avatar
    Join Date
    Sep 2006
    Posts
    324

    Resolved [RESOLVED] System Tray Icon Goes Black After Standby Mode

    Hello, I have an application that sits in the windows system tray. This application flashes at certain intervals. The way I do this is by using a timer, and change the icon every second for a shor interval. This gives the effect of a flashing icon. All of this works good without issues. Here is where the problem starts. I noticed that if the computer goes into standby mode or hibernation and then starts again, if an icon hadn't previously been shown (flashing hadn't occured yet) the icon that hadn't been shown before standby-mode shows as black. The shape of the icon is correct but is black. The current icon that the application was displaying in the system tray before the stand-by mode shows correct color and all. Anybody have any idea what the issue could be?

    Keep in mind that the icons to be displayed are stored in image objects that are on the main form of the application. I tried putting the icons into an imagelist and still had the same issue.

    This is how I flash the icon in the system tray using an ImageList object. The same occurs using an Image object.

    Code:
    nid.hIcon = Me.imgIcon.ListImages(0).Picture
    Shell_NotifyIcon NIM_MODIFY, nid
    
    nid.hIcon = Me.imgIcon.ListImages(1).Picture
    Shell_NotifyIcon NIM_MODIFY, nid
    Thanks for any insight in what may be causing this.
    Last edited by Hassan Basri; Oct 15th, 2012 at 10:19 AM. Reason: Issue was not resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width