0

Is there a way to close balloon tip programmatically, so that the user does not have to click on it?
Lets imagine that the situation changes and there is no reason to show that tip anymore, showing it longer until the timeout expires would just be noise...

I tried

icon.BalloonTipText = "";
icon.BalloonTipTitle = "";
icon.ShowBalloonTip(0);

but that resulted in ArgumentException "Balloon tip text must have a non-empty value".

I would prefer a C# answer, but C++ does too.

Roland Pihlakas
  • 4,246
  • 2
  • 43
  • 64

1 Answers1

4

There is a grotty way of doing that, I've done that before sometime. You don't need to set the text to empty.

Just hide the icon and show it back. May sound ugly but job done..

private void HideBalloonTooltip()
{
    if (notifyIcon.Visible)
    {
        notifyIcon.Visible = false;
        notifyIcon.Visible = true;
    }
}
Sriram Sakthivel
  • 72,067
  • 7
  • 111
  • 189