简体   繁体   中英

Changing taskbar button color on Windows

Multiple instances of the same application are running at the same time, and since each has multiple windows, it is not easy for the user to navigate between them. I help users by setting the titlebar color of different application instances to a different value. For example, all windows of the app instance started first will have red titlebar, all windows of the second instance will have a green one, etc.

It would also be useful to set the taskbar button color of app instances to the color I use for the titlebar. Is this possible? If not then I would be happy with a solution having similar differentiating effect, like setting the color of the text on the taskbar button, adding an overlay icon to it, etc.

The solution should work on Windows XP and later Windows versions. The language can be C/C++, C# or Delphi. Thank you very much in advance!

You cannot hope to achieve differently coloured taskbar buttons.

You could install your own shell and take complete control of the taskbar, but you can't expect your clients to do that.

You cannot expect to paint over the top of the Windows taskbar. The taskbar is animated. How are you going to keep up with that? How are you going to even know where the buttons are? I don't believe that there is a public API that will tell you that. I think you have to rule that idea out.

There is an API that allows you to change the colour of a taskbar button. It's the taskbar progress API added in Windows 7. You could use that to make your taskbar buttons yellow, green or red. I personally would not recommend that since the user will think you are showing progress.

The main options that are available to you are to change the window caption, and so the text that appears in the taskbar button. Or to change the icon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM