Determining location of tray icon

ε祈祈猫儿з 提交于 2019-12-03 13:30:53

Windows 7 and higher expose the Shell_NotifyIconGetRect() function, which returns the screen coordinates of the icon's bounding rectangle.

You'll need to provide it the notify icon GUID, though, and I don't know if you can access that property through the managed NotifyIcon class.

Further to this, I've written about a method to find the location of a notify icon when the Shell_NotifyIconGetRect function is not available: http://blog.quppa.net/2010/12/28/windows-7-style-notification-area-applications-in-wpf-part-6-notify-icon-position-pre-windows-7/

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