Search code examples
c#tooltipballoon

Is there any way to make a Balloon Tip never close?


My application is a monitor that may run in the background while the user is away, and its purpose is to visually alert the user when some changes have occurred. MessageBoxes seem a little obnoxious, so I figure a Balloon Tip will accomplish the task without messing with the focus in case they happen to be doing something.

Unfortunately, the thing requires a timeout parameter. I would like for it to stay indefinitely until the user closes it.

Is this possible?


Solution

  • This is already taken care of by Windows. The timeout counter doesn't start ticking until it detects keyboard or mouse input. From the Remarks section of NotifyIcon.ShowBalloonTip:

    In addition, if the user does not appear to be using the computer (no keyboard or mouse events are occurring) then the system does not count this time towards the timeout.