简体   繁体   English

应用程序在任务栏中

[英]Application in the Taskbar

Can you give me an example on how to put my application form in the taskbar? 您能举例说明如何将我的申请表格放在任务栏中吗? like Windows media player or Window search when minimize. 最小化时喜欢Windows媒体播放器或Window搜索。

What you are looking for is creating an Application Desktop Toolbar (also known as AppBar). 您正在寻找的是创建一个Application桌面工具栏 (也称为AppBar)。 The main function you use to register your application window as an AppBar is SHAppBarMessage . 用于将应用程序窗口注册为AppBar的主要功能是SHAppBarMessage

To get you started, you can look at this old appbar example with C++. 为了帮助您入门,您可以使用C ++查看这个旧的appbar示例 If you want to do it in C#, there's a thread that discusses some details on how to do it in WPF . 如果你想在C#中这样做,那么就有一个讨论如何在WPF中完成它的细节 I am not aware of examples of how to do it with WinForms, but a quick search on the web should bring something. 我不知道如何使用WinForms做到这一点的例子,但在网上快速搜索应该带来一些东西。

Update: Actually, if you want a toolbar that sits on the taskbar, you need to implement a Deskband. 更新:实际上,如果您想要一个位于任务栏上的工具栏,您需要实现一个Deskband。 Here's a sample DeskBand in C++ and here's a DeskBand in C# . 这是C ++中DeskBand示例,这里是C#中DeskBand

That's what happens when you don't touch a topic in a while. 这就是你在一段时间内没有触摸主题时会发生的事情。 :-) :-)

What this is really called is the 'System Tray' You want your app to have an icon in the windows system tray. 这真正称之为'系统托盘'您希望您的应用程序在Windows系统托盘中有一个图标。 Many languages provide this functionality. 许多语言都提供此功能。

Here are a few links: 以下是一些链接:

http://www.codeguru.com/Cpp/COM-Tech/shell/icons/article.php/c1335 http://www.codeguru.com/Cpp/COM-Tech/shell/icons/article.php/c1335

http://www.codeproject.com/KB/shell/systemtray.aspx http://www.codeproject.com/KB/shell/systemtray.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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