Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging the icon shown in a taskbar group for a multi window application
    primarykey
    data
    text
    <p>On Windows 7 an application can control how to group their Windows on the taskbar. Windows has some default settings related to the executable, how the shortcut was created, the name of the program, etc. to apply some default grouping. The problem with host based applications like Java, is that the same executable is used by many programs so Windows has some registry settings to set that javaw.exe is a host app. When this happens, applications must configure at runtime how to group Windows and enable pin to taskbar. I am already setting <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd378459%28v=vs.85%29.aspx" rel="nofollow">Application User Model IDs</a> in order to group Windows as needed.</p> <p>The problem that I haven't found solution is that for a multi window application: how to set a stable icon to be used on the taskbar?. The default Windows behavior for an application, say for example with two windows, where each windows has his own icon, the task bar icon shows the icon of the first opened window, if that window is closed it changes to the other one, and the process is repeated every time windows are opened and closed.</p> <p>There is some API to set the icon when the user pin an application to the taskbar setting <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd391573%28v=vs.85%29.aspx" rel="nofollow">System.AppUserModel.RelaunchIconResource window property</a>, but the documentation says that this icon is used when the app is being pinned, so according to that it only is used if the application is running from that pinned applications, leaving the problem open for applications that are not able to be pinned (or that the developer do not want to allow pinning).</p> <p>There are options like generating a new executable with the icon (launching the JVM from that application), creating a shortcut with the correct AppUserModelID. Those aren't solutions for me because the application is distributed using Java WebStart/JNLP, so the application shortcut is created by Java and the launcher is a marked as a host application (as it should)</p> <p>the other solution is to set the same icon to each window when running on Windows 7, that icon, with the exception of the taskbar one, is not very prominent on Windows 7 on Aero mode, but with Aero disabled it is, it is the icon used on the Alt+tab switcher without windows previews, something I want to leave looking different for each windows</p> <p>Note: This is a tagged Java but really is a question for any platform that use a host executable (javaw.exe, python.exe ...)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload