Re: SysTrayIconRemove
- Posted by useless Jul 06, 2011
- 2821 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.
I have tried all the flags, but the /? for taskkill specifies the kill is forcefull, regardless of flags set.
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
I tried windows.zip years ago, and again just now. No joy to be had. It thinks it's killed the app, so i then use taskkill, and taskkill actually does it.
Processviewer has the normal problem when using win32lib, there's no compatable win32lib for it, because it wasn't shipped with the one it was written to use. I have piles of these programs from the archives.
useless