Re: SysTrayIconRemove
- Posted by mattlewis (admin) Jul 06, 2011
- 2816 views
Is there something like SysTrayIconRemove in any Eu code? I am using
junk = system_exec("taskkill /F /T /IM program.exe",2)
on winxp to kill, obviously, program.exe, because there is no command to close or find another exit node on program. Then, i use
system("start /MIN \"\" \"C:\\Program Files\\programBundle\\program\\program.exe\"",0)
to restart it, during which it randomly(?) picks another exit node.
However, i get a lot of ghost icons in the systray area, which aren't removed unless the mouse cursor is moved over them slowly. How do i remove these icons from within the Eu program so i don't get 10k of them building up?
My guess is that the program isn't cleaning up after itself when it gets killed. You've probably tried this, but different flags passed to taskkill might allow the program to shut down more gracefully.
You might have better luck sending a WM_CLOSE message to the program, if possible. You might check out these from the archive for some ideas on how to accomplish that from within a euphoria program:
Process Viewer | A wrapper for 'CreateToolhelp32Snapshot', it lists all running processes along with any associated files/dlls with path, IDs number of threads. Example program included (example needs Win32Lib) | Pete Stoner | Jun 16/06 |
Monitor all windows | A utility that displays information on all the windows in your system. It lets you switch to them and optionally close them. The source plus a translated .exe are included. | Greg Haberek | Apr 7/03 |
Matt