开发者

How to get taskbar background color

I have notifyIcon located at the notifyArea of the Win7 taskbar. This Icon contain dynamic t开发者_开发技巧ext info - Black text on the trasparent bitmap. So, with Standard Windows theme (light) information readable but with other "dark" windows themes not.

I want to get taskbar background color and eventually draw Icon with appropriate color (ex White text if Dark taskbar color)


It seems that you are not the first to try.

I think that there are two alternatives, if you don't want a background colour:

  1. Add a text border or shadow. You can do that by drawing the text in the border/shadow colour first with a one pixel deviation in the four directions (border) or in the shadow direction. I suggest a black border around light text.

  2. As I understand windows icon support a reverse colour, which is the opposite of whatever colour it is painted on. Don't look nice but they are pretty visible - I am using them for my cursor.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜