gpt4 book ai didi

c# - 如何在Windows任务栏中制作一个文本框?

转载 作者:可可西里 更新时间:2023-11-01 14:18:41 26 4
gpt4 key购买 nike

我正在制作一个应用程序,它将接受用户的搜索查询并显示结果。为了使界面更友好,我想到了在任务栏中制作一个文本框,它接受输入,然后在新窗口中显示结果。我已经在 SO 和其他网站上查看了相同问题的链接。
根据我使用 google 和其他网站发现的情况,我们需要使用 Bands 来实现这一目标。
有人可以向我解释上述问题(Bands)的解决方案吗,您可以指出任何好的链接或一些文章,或者您可以编写代码示例来解释。我只需要足够的信息来帮助我着手解决这个问题。

最佳答案

“您应该在新开发中使用缩略图工具栏来代替 Windows 7 不支持的桌面带。” - MSDN

不幸的是,Microsoft 似乎不鼓励创建您所说的任务栏内 GUI。另一种选择是使用任务栏扩展,如前所述here . MSDN 似乎确实在任务栏扩展页面上提供了一些相互矛盾的信息,将开发人员引导至 IDeskBand2 页面(顶部引用的来源)。为了将来的兼容性,我仍然建议不要这样做。

如果您已经死定了,或者您出于某种原因只针对 xp(或 vista),以下内容可能会有所帮助:

Although they can be used much like normal windows, band objects are COM objects that exist within a container. Explorer Bars are contained by Internet Explorer, and desk bands are contained by the Shell. While they serve different functions, their basic implementation is very similar. The primary difference is in how the band object is registered, which in turn controls the type of object and its container. This section discusses those aspects of implementation that are common to all band objects. See A Simple Example of a Custom Explorer Bar for additional implementation details.In addition to IUnknown and IClassFactory, all band objects must implement the following interfaces:
- IDeskBand
- IObjectWithSite
- IPersistStream

In addition to registering their class identifier (CLSID), the Explorer Bar and desk band objects must also be registered for the appropriate component category. Registering the component category determines the object type and its container. Tool bands use a different registration procedure and do not have a category identifier (CATID). The CATIDs for the three band objects that require them are:
- Band Type: Component Category
- Vertical Explorer Bar: CATID_InfoBand
- Horizontal Explorer Bar: CATID_CommBand
- Desk Band: CATID_DeskBand

几乎所有你需要知道的都可以找到here

关于c# - 如何在Windows任务栏中制作一个文本框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20175145/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com