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);
}
}
通知アイコンをダブルクリックすると、バルーンチップが2回表示/更新されますが、メッセージボックスは表示されません。
VisualStudio2010とWindows7Ultimate64ビットを使用しています。
助けてくれてありがとう!