How do I create a toolbar for the Taskbar on Windows?

时间秒杀一切 提交于 2019-12-28 05:52:15

问题


How do I go about creating my own taskbar toolbar, a la Windows Media Player:

Windows Media Player's Start bar toolbar http://me.monoxide.ws/images/wmp-toolbar.gif

Examples or documentation or even open source software that implements this for just about any language would be appreciated, but Google isn't being very helpful. Ultimately, I would like to do this in C# (I expect to need P/Invoke) for XP onwards, but any language and Vista onwards would be acceptable/helpful too.


回答1:


Check this out:

http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/e180c4d5-8cd7-47e3-b45a-d643c02bab36


(source: microsoft.com)

It's called as "Desk Band"

See MSDN desription about this http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/bands.asp and sample over there http://www.codeproject.com/csharp/dotnetbandobjects.asp

By the way, thanks for asking this question. Back in the days I also wanted to do this. However, yesterday I said bye bye to Windows and Hi to Mac. If you asked this yesterday I would upvote it trice if I could ;-)




回答2:


You'll notice that Media Player on Win7 doesn't have a desk band. Instead it has tiny play/pause buttons in the thumbnail preview that appears when you mouse over the taskbar icon. You can do the same thing for your application. If you use Code Pack (http://code.msdn.microsoft.com/WindowsAPICodePack) there is a sample under Samples\Shell\ThumbnailToolbarDemo. Windows 7 only, but way less annoying than taking up an inch or two of taskbar, and just as handy when you want to insta-pause.



来源:https://stackoverflow.com/questions/1327457/how-do-i-create-a-toolbar-for-the-taskbar-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!