Popupmenu with wrong behaviour?

Hello,

my program puts an icon in the taskbar notifycation area. On right mouse
button click it shows there a popupmenu. But this popupmenu doesn't
behave like other popupmenus from icons in the TNA. Normally it should
disappear if you click somewhere outside the menu. It is only set in the
background and disappears when you move with the mouse above it. I tried
it with a delphi component and with the api-function trackpopupmenu, but
it's always the same.
I recognized that other icons or popupmenus from icons in the TNA
receive more windowsmessages than mine, but I don't know why.

Is anybody out there who can help or has the same problem?
About help I will be very happy.

Greetings to all readers

Wim Nienkerke