System Tray Refresh

  • Thread starter Thread starter elziko
  • Start date Start date
E

elziko

If I **HAD** to use Process.Kill to end an application that I had no other
control over. This application leaves an icon in the system tray.

Is there any way in code to force WIndows to refresh the system tray to
remove this icon. Much like Windows does if I was to run the mouse over the
system tray.

TIA
 
Is there any way in code to force WIndows to refresh the system tray to
I'm by no means the expert, but what I've read is you manually call the
dispose method, or some other method to force the GC to run which will clear
out the memory used for the icon used in the system tray.

I just tried googling around and here's a few links.

look for the Dispose() method
http://www.mastercsharp.com/article.aspx?ArticleID=23&&TopicID=8

Step VII talks a bit about disposing
http://www.codeproject.com/csharp/systemtraynotifyicon.asp

I'm learning like you, hth?
 
look for the Dispose() method

Thanks but I am not writing the code for the program that has the icon in
the system tray. I am just killing its process from my code. I then need to
force Windows to remove the icon from the system tray.

As far as I can see I have nothing to call dispose on!
 
Back
Top