If a program is executed for the first time in Windows 7, it automatically hides the icon. Is there any manifest setting or option to force Windows 7 to always show the icon by default?
相关问题
- How to Debug/Register a Permanent WMI Event Which
- the application was unable to start correctly 0xc0
- Windows 7: How can I get a list of all Windows use
- How to ask for Administrator privileges in Windows
- SVN+SSH checkout over VPN using tortoise SVN, Smar
相关文章
- How to show appropriate icon on dialog box
- How to style an unordered list with jQuery UI so t
- Looking for documentation on the “right” way to in
- PHP 7 FTP extension is not loaded in Windows 7
- Can I set a different icon for the android task sw
- Viewing the Process Tree - tlist/tasklist [closed]
- I it possible to include external SVG defs
- The module “.dll” was loaded but the entry-point w
It's certainly not "impossible". There is an undocumented COM interface
ITrayNotify
for retrieving tray icons and changing their visibility, used by Explorer itself. Full C++ source here: http://thread0.me/tag/windows/Of course, using an unofficial API is risky and Windows 8 has intoduced breaking changes to this API, which means you have to use 2 different definitions for XP - Win7 and Win8 - Win10. But hey, even Chrome uses this trick. Just be sure to handle failures properly.
A question marked as duplicate has the answer of how it is done.
If you really want to show your tray-icon, you can popup a balloon with minimal text and just afterwards hide the balloon and it's shadow again by following code-example:
if you repeat this (e.g. every 30 seconds), your trayicon will stay there because Explorer.exe thinks, there is a balloon open to display to the user. A few minor issues - such as no right-click directly on icon - are still there.
I really used to show the tray icon for our company-software where the user are not intended to do this manually and for each update. So maybe this will help someone... :)
Otherwise, I totally agree: This should be only in hands of the user, not controlled by the application.
In .NET Rocks podcast, not long time ago, Kate Gregory from Microsoft was saying that it is impossible.
She said something like: "If user wants it (tray icon) he/she will put it there". Reason for this is to prevent mess in the tray area.