Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NotifyIcon.ShowBalloonTip not keeps timeout

Tags:

c#

winforms

I show notify information:

 notifyIcon.ShowBalloonTip(29000, "title", "message", ToolTipIcon.Info);

It should show 29 000 milliseconds, but it disappears in less than a second.

I understand this is controlled by the operating system. But there should be a way to increase the duration of the show?

Use windows 7.

like image 619
Alexander Molodih Avatar asked Jul 27 '11 14:07

Alexander Molodih


3 Answers

From the MSDN article on ShowBalloonTip

"Minimum and maximum timeout values are enforced by the operating system and are typically 10 and 30 seconds, respectively, however this can vary depending on the operating system. Timeout values that are too large or too small are adjusted to the appropriate minimum or maximum value. 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."

You can read about the entire function below:

http://msdn.microsoft.com/en-us/library/ms160064.aspx

like image 112
Justin Avatar answered Sep 17 '22 17:09

Justin


Make sure the NotifyIcon is visible before showing the balloon:

notifyIcon.Visible = true;
//then show the balloon tip

Also, if any other balloon tips are showing, yours will be ignored.

http://msdn.microsoft.com/en-us/library/ms160065.aspx

like image 2
Evan Mulawski Avatar answered Sep 19 '22 17:09

Evan Mulawski


It depends from OS setups, in each OS it is different. Best way is in using a self created baloon.

like image 2
Alexander Molodih Avatar answered Sep 18 '22 17:09

Alexander Molodih