views:

3099

answers:

3

I'm having trouble with something that I thought would be easy... I can't get my NotifyIcon to show a balloon tip. The basic code is:

public void ShowSystrayBubble(string msg, int ms)
{
  sysTrayIcon.Visible = true;
  sysTrayIcon.ShowBalloonTip(20, "Title", "Text", ToolTipIcon.None);
}

Nothing happens when I execute this code. I read that the timeout arg may be in seconds or ms, can't tell, so I tried both and neither works.

I'm using WinXP, .NET 3.5.

Thanks, -Greg

+3  A: 

I had foiled myself... This turned out to be an issue at the OS level. I had previously disabled all balloons via the registry a few weeks ago.

You can read the information here on how to disable balloon tips in WinXP: http://support.microsoft.com/kb/307729

To enable them, just set the registry value to 1 instead and logon again/restart.

greg7gkb
+1  A: 

You should then log the messages for users who have disabled the balloons be able to go review them in case of need. If you can get permissions to read the registry, you could check the value and act accordingly (not to modify the value, but to log or to show the balloon).

Vinko Vrsalovic
Nice, thanks for the improvement. -g
greg7gkb
+1  A: 

Please see this it covers all combinations of mouse clicks with NotifyIcon as well as much more. The code is located in a template and is project setting driven so that you can implement NotifyIcon logic in all your projects with no coding effort at all.

More Here

http://code.msdn.microsoft.com/TheNotifyIconExample