on some systems I've noticed that explorer crashes (for external reasons). When that happens, the trayed icon is not refreshed (as well as other trayed icons of other programs) and the user can no more click it to access the program's menu (for example)
So, I made the small changes below in TTray.prg:
- Code: Select all Expand view RUN
14. CLASS TTrayIcon
15.
16. DATA oTray
17. DATA oWnd
18. DATA oIcon
19. DATA cCaption
DATA lSuccess // <--
20.
21. DATA bLClicked
....
124. c := oTray:cBuffer
125.
126. ::lSuccess := Shell_NotifyIcon( If( lAdd, NIM_ADD, NIM_MODIFY ), @c ) // <--
127.
128. oTray:cBuffer := c
This allow me to perform an oTray:SetIcon() from time to time. If oTray:lSuccess is .F., then I can oTray:End() and oTray:New() again to have the icon reappearing
If you've already found a better solution, please let me know, otherwise, Antonio, could you please add those changes to the standard TTray.prg ?
Thanks,
Davide