如何检测通知图标是否双击
private NotifyIcon NotifyIcon;
NotifyIcon = new NotifyIcon();
NotifyIcon.Text = "FCleaner";
NotifyIcon.Icon = new Icon(SystemIcons.Application, 40, 40);
NotifyIcon.ContextMenu = cmsNotifyicon;
NotifyIcon.Visible = true;
如果双击通知图标,如何调用此方法? private void NotifyIcon_MouseDoubleClick(object sender,MouseEventArgs e)
答案 0 :(得分:0)
您需要订阅该活动,并将其附加到您的活动处理程序。
private NotifyIcon _notifyIcon;
_notifyIcon= new NotifyIcon();
_notifyIcon.Text = "FCleaner";
_notifyIcon.Icon = new Icon(SystemIcons.Application, 40, 40);
_notifyIcon.ContextMenu = cmsNotifyicon;
_notifyIcon.Visible = true;
_notifyIcon.MouseDoubleClick += NotifyIcon_MouseDoubleClick;