当Windows窗体中使用的NotifyIcon/C#/。NET Framework 2.0的,如果我显示在鼠标点击或点击气球提示文字。事件,没有的DoubleClick或MouseDoubleClick的事件将触发:C#,Windows窗体:NotifyIcon的与Click事件ShowBalloonTip不再触发DoubleClick事件
private void notifyIcon_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show("double click"); // this is never called on double-click
}
private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{
MessageBox.Show("mouse double click"); // this is never called on double-click
}
private void notifyIcon_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.notifyIcon.BalloonTipText = "Some Info";
this.notifyIcon.ShowBalloonTip(1000);
}
}
如果我双击该图标通知,我得到的气球提示显示出/刷新两次,但没有消息框。
我正在使用Visual Studio 2010和Windows 7 Ultimate 64位。
在此先感谢您的帮助!
您的代码正在我的电脑上工作。我建议检查你的'双击速度' – 2011-01-12 15:49:42
当你说“双击速度”,你的意思是在Windows中的设置? – AnAurelian 2011-01-13 12:32:45