如何获取通知区域图标的工具提示?
我可以用通知区域中的图标枚举应用程序(句柄、pid、路径),并且可以控制图标的位置,但无法获取工具提示。
如何枚举系统托盘图标(包括工具提示)?
I can enumerate the applications (handle,pid,path) with icons in the notification area, and I can control the position of the icons, but I can't get the tooltip.
How can I enumerate systray icons including the tooltips?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
shell 不提供检查不属于您的程序的通知图标的工具。 (而且它甚至无法枚举属于您的程序的图标;您应该已经知道这些图标。)
我曾经使用过一个劫持部分或全部图标的程序并可选择将它们显示在自己的窗口中,而不是在时钟附近的区域中,因此它必须能够获取所有图标的列表。这是 TraySaver,作者:Mike Lin。如果您想了解他的黑客是如何工作的,可以使用该源代码。
您还可以查看上一个问题的答案,该问题询问有关控制通知区域中的图标。
The shell provides no facility for inspecting notification icons that don't belong to your program. (And it provides no way of enumerating even the icons that do belong to your program; you're expected to already know about those.)
I used to use a program that hijacked some or all of the icons and optionally displayed them in its own window instead of in the area near the clock, so it must have been able to get a list of all the icons. It was TraySaver, by Mike Lin. The source is available if you wish to see how his hack worked.
You can also take a look at the answers to a previous question that asked about controlling the position of icons in the notification area.
您应该查看 madshis 组件集合的 madKernal 包。它有一些使用托盘图标的接口。但请注意:
ITrayIcon 界面具有提示、图标、位置等属性。
You should take a look at the madKernal package of madshis component collection. It has some interfaces for working with trayicons. Beware, though:
The ITrayIcon-interface has properties for hint, icon, position and more.
这是我在 windows xp 和 delphi 2010 上测试的方法,如果您使用的是不支持 unicode 的 delphi 版本,请确保将读取的字符串转换为 ansi
Here is my method tested with windows xp and delphi 2010 if you are using a version of delphi wich doesn't support unicode make shure you convert the strings read to ansi