Results 1 to 3 of 3

Thread: Tray Icon disapers

  1. #1

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Exclamation Tray Icon disapers

    Hai friends.

    My programs loads to system tray at windows startup.

    After loading xp, on few occations the icon is not shown in tray. but i can see the program running in Task Manager.

    VB Code:
    1. With icodata
    2. .cbSize = Len(icodata)
    3. .hwnd = Me.hwnd
    4. .hIcon = Me.Icon
    5. .szTip = "My program name and version" & Chr$(0) '0 is for truncate
    6. .ucallbackMessage = WM_LBUTTONDOWN
    7. .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    8. .uId = 1
    9. End With
    10. Shell_NotifyIcon NIM_ADD, icodata

    Any thing wrong with the codes?
    if not what could be the problem you think?

    It is remarkable that i have not add any flags to the oprograms startup entry path. i.e. -osboot , /STARTUP , -quiet
    Last edited by Fazi; Sep 28th, 2006 at 10:48 AM. Reason: Edit a word

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Tray Icon disapers

    First make sure that XP's "hide inactive tray icon" is not enabled.

    If you're not running exactly same code that you posted,
    If you are loading the icon using LoadPicture, thewn make sure it is a valid Windows Icon file. Bitmap/jpg files doesn't work.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3

    Thread Starter
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Tray Icon disapers

    Hai prank.

    No. "hide inactive tray icon" is not enabled.
    Also the code i posted is the same code except tool tip text.
    I am not loading the icon. i use form icon ( me.icon ) as shown in the code.

    What could be then?

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