Hi, Marco -
I am using the NOTIFYICONDATA structure. I was a little terse in my
description. Sorry.
The icon disappears upon using NIM_DELETE and then milliseconds later
reappears.
A simple trace-through does not reveal the source of the problem. In fact,
in the IDE, the icon disappears like I want.
I have some object references that I really should release earlier in the
termination chain.
Perhaps therein lies my problem.
Thanks for the response -
Montie
At 09:38 AM 1/16/01 -0800, you wrote:
>Montie,
>
>the Shell_NotifyIcon() API (at least the one I use, version 4.0) needs a
>second parameter, a NOTIFYICONDATA udt. Use the same one you use when you
>call Shell_NotifyIcon() with the NIM_ADD parameter. I keep a copy of mine
>global in the form (but not public), and when the form unloads the icon goes
>away. I am using NT4.
>These are my API declarations:
>
>Private Type NOTIFYICONDATA
> cbSize As Long
> hwnd As Long
> uID As Long
> uFlags As Long
> uCallbackMessage As Long
> hIcon As Long
> szTip As String * 64
>End Type
>Private Declare Function Shell_NotifyIcon Lib "shell32" Alias
>"Shell_NotifyIconA" _
> (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
>Const NIM_ADD = &H0 ' Add an icon
>Const NIM_MODIFY = &H1 ' Modify an icon
>Const NIM_DELETE = &H2 ' Delete an icon
>Const NIF_MESSAGE = &H1 ' To change uCallBackMessage member
>Const NIF_ICON = &H2 ' To change the icon
>Const NIF_TIP = &H4 ' To change the tooltip text
>
>m.
>
>