Hello everybody,

I have an application that puts an icon in the system tray. Everything works good. I noticed however that when I connect to the desktop using remote desktop the colors of the icons are off i.e. whites in the icon become light blue etc... If I close the application and reopen it in the remote desktop session the colors of the icon become correct.

Is there any way of knowing when somebody has connected using remote desktop and then I will know to recreate the system tray icon? I found this windows message that I can use but it is only for XP and above.

WM_WTSSESSION_CHANGE
http://www.vbforums.com/showthread.php?t=465377

Or is there a better way of fixing this problem then the technique described above? Thanks for any assistance.