如何在运行时获取notifyicon的位置 [英] How to get the location of notifyicon at runtime

查看:80
本文介绍了如何在运行时获取notifyicon的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在运行时获取在托盘中显示的notifyicon的位置.基本上,我想在运行时在notifyicon图标上方显示一个箭头形状的表单,以便如何在运行时获取notifyicon的位置.

How to get the location of notifyicon at runtime which is displayed in tray. Acatually I wanted to show a form shaped as arrow just above the icon of notifyicon at runtiime so how to get the location of the notifyicon at runtime.

推荐答案

如果没有严重的PInvoke东西,除了在应用程序中获得鼠标单击位置之外,没有其他方法可以做到这一点.一个很大的问题是,NotifyIcon托盘可以按照需要重新排列图标,而您将无法分辨.我也知道用户可以隐藏不活动的图标,这可能使您更加头疼.
There really is no way of doing this without some seriously hefty PInvoke stuff, other than getting mouse click location inside your app. A big problem will be that the NotifyIcon tray can rearrange the icons as it sees fit, and you won''t be able to tell. I also know users can Hide inactive icons, which could cause you even more headaches.


这篇关于如何在运行时获取notifyicon的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆