示例#1
0
 public void ShowBalloon(EBalloonIcon Icon, string Text, string Title, [Optional] int Timeout /* = 0x3a98 */)
 {
     this.m_VisibleBeforeBalloon = this.m_Visible;
     this.NID.uFlags            |= 0x10;
     this.NID.uVersion           = Timeout;
     this.NID.szInfo             = Text;
     this.NID.szInfoTitle        = Title;
     this.NID.dwInfoFlags        = Convert.ToInt32((int)Icon);
     if (!this.Visible)
     {
         this.Visible = true;
     }
     else
     {
         MZ.NotifyIconEx.Shell_NotifyIcon(1, ref this.NID);
     }
     this.NID.uFlags &= -17;
 }
示例#2
0
        /// <summary>
        /// Overloaded. Display a balloon window on top of the tray icon.
        /// </summary>
        /// <param name="icon">Balloon window icon</param>
        /// <param name="text">Text to display</param>
        /// <param name="title">Title to display</param>
        /// <param name="timeout">Time in msecs that the balloon window should be displayed</param>
        public void ShowBalloon(EBalloonIcon icon, string text, string title, int timeout)
        {
            int _old = _NID.uFlags;

            _visibleBeforeBalloon = _visible;
            _NID.uFlags          |= NIF_INFO;
            _NID.uVersion         = timeout;
            // 10.Oct. 2003, TorstenR, Next line fixes the bug "Did not receive the balloon window messages" !!!
            _NID.hWnd = _messages.Handle;

            _NID.szInfo      = text;
            _NID.szInfoTitle = title;
            _NID.dwInfoFlags = (int)icon;
            if (!Visible)
            {
                Visible = true;
            }
            else
            {
                CallShellNotify(NIM_MODIFY);
            }
            _NID.uVersion = NOTIFYICON_VERSION;
            _NID.uFlags   = _old;
        }
示例#3
0
 /// <summary>
 /// Overloaded. Display a balloon window on top of the tray icon.
 /// </summary>
 /// <param name="icon">Balloon window icon</param>
 /// <param name="text">Text to display</param>
 /// <param name="title">Title to display</param>
 public void ShowBalloon(EBalloonIcon icon, string text, string title)
 {
     this.ShowBalloon(icon, text, title, 15000);
 }