Kill process, tray icon remains

  • Thread starter Thread starter Jeroen
  • Start date Start date
J

Jeroen

Hi,

I have to kill an other application and restart it (because my app puts some
new files for it to read)
the only way i know how to close an other application is to kill it.

But if i kill it (and that happens once every 15 minutes) the tray icon of
that app remains.
Is there any way i can "refresh" the trayIcons? (or an other way to close
the application, so the icon will go away?)

Jeroen
 
Speculation: If the app closes normally, does the tray icon disappear?
Can you come up with a way for the two apps to communicate, with the second
one telling the first, I've got new data, please release your file lock so I
can renew the files?
Having the second app remotely kill the first isn't an ideal method.

Possible methods for communication, a timer leading to reading a shared
file, custom windows messages, tcp/ip client server, etc.
 
It sounds like you are terminating the process, not allowing it to close
itself. In that case, it never has a chance to remove its icon in the tray.
You might be able to force the shell to redraw the tray, but my experience
is that even this will not remove the icon. If you try to tap on the icon,
the shell will realize that the application which placed the icon is gone
and remove it, of course. The right thing to do is to 'kill' the
application cleanly, so it can remove the icon properly.

Paul T.
 
Back
Top