By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,382 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

System Tray Refresh

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> 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....=23&&TopicID=8

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

I'm learning like you, hth?
Jul 21 '05 #2

P: n/a
> 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!
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.