开发者

Making an animated taskbar app

开发者 https://www.devze.com 2022-12-26 09:49 出处:网络
I have a HP notebook (running XP). I have seen on IBM computers, that they have a power-meter (it looks like a bar). It displays percentage of power left in battery. It is displayed in the taskbar. No

I have a HP notebook (running XP). I have seen on IBM computers, that they have a power-meter (it looks like a bar). It displays percentage of power left in battery. It is displayed in the taskbar. Not in the systemtray. Either on the left side or the right side of the potential language toolbar.

The application is animated, since the percentage of power (0-100%) chances. It fills up the bar with a green color according to the percentage. So half would be colored green if the power is down to 50%.

Now, since it is an IBM application for IBM notebooks, I want/need to make a copy of it.

M开发者_StackOverflow社区y real question is though, how do I make an animated taskbar application?


What you are looking for is creating an Application Desktop Toolbar (also known as AppBar). The main function you use to register your application window as an AppBar is SHAppBarMessage.

To get you started, you can look at this old appbar example with C++. If you want to do it in C#, there's a thread that discusses some details on how to do it in WPF. I am not aware of examples of how to do it with WinForms, but a quick search on the web should bring something.

Update: Actually, if you want a toolbar that sits on the taskbar, you need to implement a Deskband. Here's a sample DeskBand in C++ and here's a DeskBand in C#.

That's what happens when you don't touch a topic in a while. :-)

Source:

This is actually an already answered question.

0

精彩评论

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

关注公众号