|
-
Sep 28th, 2006, 10:46 AM
#1
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:
With icodata
.cbSize = Len(icodata)
.hwnd = Me.hwnd
.hIcon = Me.Icon
.szTip = "My program name and version" & Chr$(0) '0 is for truncate
.ucallbackMessage = WM_LBUTTONDOWN
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uId = 1
End With
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
-
Sep 28th, 2006, 11:13 AM
#2
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.
-
Sep 28th, 2006, 11:25 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|