{"id":10643,"date":"2011-05-18T07:00:00","date_gmt":"2011-05-18T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/05\/18\/how-long-do-taskbar-notification-balloons-appear-on-the-screen\/"},"modified":"2011-05-18T07:00:00","modified_gmt":"2011-05-18T07:00:00","slug":"how-long-do-taskbar-notification-balloons-appear-on-the-screen","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110518-00\/?p=10643","title":{"rendered":"How long do taskbar notification balloons appear on the screen?"},"content":{"rendered":"<p>\nWe saw some time ago that\n<a HREF=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/01\/10\/349894.aspx\">\ntaskbar notification balloons don&#8217;t penalize you for being away\nfrom the computer<\/a>.\nBut how long does the balloon stay up when the user is there?\n<\/p>\n<p>\nOriginally, the balloon appeared for whatever amount of time\nthe application specified in the <code>uTimeout<\/code> member\nof the <code>NOTIFYICONDATA<\/code> structure,\nsubject to a system-imposed minimum of 10 seconds and maximum\nof 60 seconds.\n<\/p>\n<p>\nIn Windows XP, some animation was added to the balloon,\nadding 2 seconds of fade-in and fade-out animation\nto the display time.\n<\/p>\n<p>\nStarting in Windows Vista,\napplications are no longer allowed to specify how long they\nwanted the balloon to appear;\nthe <code>uTimeout<\/code> member is ignored.\nInstead, the display time is\nthe amount of time specified\nby the <code>SPI_GETMESSAGEDURATION<\/code> system parameter,\nwith 1&nbsp;second devoted to fade-in and\n5&nbsp;seconds devoted to fade-out, with a minimum of 3&nbsp;seconds\nof full visibility.\nIn other words,\nif you set the message duration to less than\n1+3+5=9&nbsp;seconds,\nthe taskbar behaves as if you had set it to 9&nbsp;seconds.\n<\/p>\n<p>\nThe default message duration is 5&nbsp;seconds,\nso in fact most systems are in the &#8220;shorted possible time&#8221;\ncase.\nIf you want to extend the time for which balloons notification appear,\nyou can use the <code>SystemParametersInfo<\/code> function to change it:\n<\/p>\n<pre>\nBOOL SetMessageDuration(DWORD seconds, UINT flags)\n{\n return SystemParametersInfo(SPI_SETMESSAGEDURATION,\n                             0, IntToPtr(seconds), flags);\n}\n<\/pre>\n<p>\n(You typically don&#8217;t need to mess with this setting, because\nyou can rescue a balloon from fading out by moving the mouse over it.)\n<\/p>\n<p>\nNote that an application can also set the <code>NIF_REALTIME<\/code>\nflag, which means\n&#8220;If I can&#8217;t display the balloon <i>right now<\/i>, then just skip it.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We saw some time ago that taskbar notification balloons don&#8217;t penalize you for being away from the computer. But how long does the balloon stay up when the user is there? Originally, the balloon appeared for whatever amount of time the application specified in the uTimeout member of the NOTIFYICONDATA structure, subject to a system-imposed [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-10643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>We saw some time ago that taskbar notification balloons don&#8217;t penalize you for being away from the computer. But how long does the balloon stay up when the user is there? Originally, the balloon appeared for whatever amount of time the application specified in the uTimeout member of the NOTIFYICONDATA structure, subject to a system-imposed [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=10643"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10643\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=10643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=10643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=10643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}