如何在Windows上为任务栏创建工具栏?

时间:2022-06-20 07:26:39

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

如何创建自己的任务栏工具栏,即Windows Media Player:

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

Windows Media Player的“开始”栏工具栏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.

任何语言的实例或文档甚至是开源软件都会受到赞赏,但谷歌并不是很有帮助。最终,我希望在C#中实现这一点(我希望需要P / Invoke),但是任何语言和Vista都可以接受/有用。

2 个解决方案

#1


8  

Check this out:

看一下这个:

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

alt text http://i.msdn.microsoft.com/Bb776819.desk1%28en-us,VS.85%29.jpg

alt text http://i.msdn.microsoft.com/Bb776819.desk1%28en-us,VS.85%29.jpg

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

请参阅MSDN desription有关此http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/bands.asp以及那里的示例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 ;-)

顺便说一句,谢谢你提出这个问题。回到过去,我也想这样做。但是,昨天我再向Windows和Hi转到Mac。如果你昨天问了这个问题,我会尽可能地投票,如果可以的话;-)

#2


0  

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.

您会注意到Win7上的Media Player没有桌面频段。相反,当您将鼠标悬停在任务栏图标上时,缩略图预览中会显示微小的播放/暂停按钮。您可以为您的应用程序执行相同的操作。如果您使用Code Pack(http://code.msdn.microsoft.com/WindowsAPICodePack),Samples \ Shell \ ThumbnailToolbarDemo下有一个示例。仅限Windows 7,但不如占用一两英寸任务栏那么烦人,而且当您想要暂停时也很方便。

#1


8  

Check this out:

看一下这个:

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

alt text http://i.msdn.microsoft.com/Bb776819.desk1%28en-us,VS.85%29.jpg

alt text http://i.msdn.microsoft.com/Bb776819.desk1%28en-us,VS.85%29.jpg

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

请参阅MSDN desription有关此http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/bands.asp以及那里的示例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 ;-)

顺便说一句,谢谢你提出这个问题。回到过去,我也想这样做。但是,昨天我再向Windows和Hi转到Mac。如果你昨天问了这个问题,我会尽可能地投票,如果可以的话;-)

#2


0  

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.

您会注意到Win7上的Media Player没有桌面频段。相反,当您将鼠标悬停在任务栏图标上时,缩略图预览中会显示微小的播放/暂停按钮。您可以为您的应用程序执行相同的操作。如果您使用Code Pack(http://code.msdn.microsoft.com/WindowsAPICodePack),Samples \ Shell \ ThumbnailToolbarDemo下有一个示例。仅限Windows 7,但不如占用一两英寸任务栏那么烦人,而且当您想要暂停时也很方便。