Application in the Taskbar

荒凉一梦 提交于 2019-12-09 10:58:41

问题


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.


回答1:


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. :-)




回答2:


What this is really called is the 'System Tray' You want your app to have an icon in the windows system tray. Many languages provide this functionality.

Here are a few links:

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

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



来源:https://stackoverflow.com/questions/1641453/application-in-the-taskbar

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