當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