在 Windows Forms/C#/.Net Framework 2.0 中使用 NotifyIcon 时,如果我在MouseClick或Click事件中显示气球提示文本,则不会触发任何DoubleClick或MouseDoubleClick事件:
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 位。
提前感谢您的帮助!