/// <summary> /// Shows a balloon tip over the item with the specified icon, /// message and title for the specified timeout interval. ME/2000 or above only. /// </summary> /// <param name="message">Balloon tip message to display (max 256 chars)</param> /// <param name="icon">Icon to show</param> /// <param name="title">Title of balloon tip (max 64 chars)</param> /// <param name="timeOut">Timeout in milliseconds. The system restricts timeouts /// to the range 10,000 - 30,000 ms.</param> public void ShowBalloonTip( string message, NotifyIconBalloonIconFlags icon, string title, int timeOut ) { if (this.inSysTray) { // show the balloon tip: NOTIFYICONDATA ids = newNotifyIconData(); ids.uFlags = NotifyIconDataFlags.NIF_INFO; ids.szInfo = message; ids.szInfoTitle = title; ids.dwInfoFlags = icon; ids.uTimeoutOrVersion = timeOut; int ret = Shell_NotifyIcon( NotifyIconMessages.NIM_MODIFY, ref ids); } else { // should throw exception? } }
/// <summary> /// Shows a balloon tip over the item with the specified icon /// and message for the maximum timeout value. ME/2000 or above only. /// </summary> /// <param name="message">Balloon tip message to display (max 256 chars)</param> /// <param name="icon">Icon to show</param> public void ShowBalloonTip( string message, NotifyIconBalloonIconFlags icon ) { ShowBalloonTip( message, icon, "", 100000); }
/// <summary> /// Shows a balloon tip over the item with the specified icon, /// message and title, for the maximum timeout value. ME/2000 or above only. /// </summary> /// <param name="message">Balloon tip message to display (max 256 chars)</param> /// <param name="icon">Icon to show</param> /// <param name="title">Title of the balloon tip (max 64 chars)</param> public void ShowBalloonTip( string message, NotifyIconBalloonIconFlags icon, string title ) { ShowBalloonTip( message, icon, title, 100000); }