We have some software that shows a BalloonTip on a NotifyIcon with a reasonably small timeout of 5 seconds. When the user clicks the balloon, some action is started.
I received a bug report that when the user keeps the Ballon Tip open for longer than the timeout (by moving the mouse over it, I assume to buy time to read the message), then as soon as the timeout has passed, clicking the BalloonTip has no effect anymore, even though it's still being shown.
I reproduced this in a small Windows Forms sample project, with just a button and an icon and indeed after the timeout has passed, the BalloonTipClicked event doesn't get fired when the user clicks on the balloon. Before that time, the event handler is invoked nicely.
My reproduction code:
private NotifyIcon _icon; private void Form1_Load(object sender, EventArgs e) { _icon = new NotifyIcon(); _icon.Icon = SystemIcons.Information; _icon.BalloonTipTitle = "Balloon Tip Title"; _icon.BalloonTipText = "Balloon Tip Text."; _icon.BalloonTipIcon = ToolTipIcon.Error; _icon.BalloonTipClicked += _icon_BalloonTipClicked; _icon.BalloonTipShown += _icon_BalloonTipShown; _icon.Visible = true; } void _icon_BalloonTipShown(object sender, EventArgs e) { button1.Text = "Balloon tip shown"; } void _icon_BalloonTipClicked(object sender, EventArgs e) { button1.Text = "Balloon tip clicked"; } private void button1_Click(object sender, EventArgs e) { _icon.ShowBalloonTip(5000); }
Any hints on how to get this working are appreciated.