如何写浮动气球

来源:互联网 发布:足球阵容软件 编辑:程序博客网 时间:2024/04/28 04:53

1.在任务栏显示

NotifyIcon   balloon   =   new   NotifyIcon();  
                  balloon.Visible   =   true;  
                  balloon.Icon   =   new   Icon(@"D:/Resource/source   code/C#/NotifyIcon(SalverBalloonTips)/EYE.ICO");  
                  balloon.ShowBalloonTip(10,   "Balloon   tips",   "Hello,China.Newlad",   ToolTipIcon.Info);   

2.在任意控件上显示

ToolTip m_tooltip = new ToolTip();

            m_tooltip.AutoPopDelay = 5000;//display   5s.  
            m_tooltip.InitialDelay = 100;//after   1s   the   tooltip   will   show.  
            m_tooltip.ReshowDelay = 100;//reshow   time.  
            m_tooltip.ShowAlways = true;//active   or   not   ,it   always   show.  

            m_tooltip.IsBalloon = true;//change   the   style   to   balloon.  
            m_tooltip.ToolTipIcon = ToolTipIcon.Info;//set   the   icon.  
            m_tooltip.ToolTipTitle = "Hello";//set   the   caption  

            m_tooltip.SetToolTip(this.button1, "This   is   caption");//set   which   control   to   show   this   balloon.    

原创粉丝点击