C# 控制台能实现托盘气泡提示吗?小妹妹刚学 不知道怎么写 麻烦提供下代码记住哦 是控制台 不是窗体哦!例如:控制台启动的时候  托盘提示 "欢迎小雅妹妹"

解决方案 »

  1.   

    可以啊,你建一个System.Windows.Forms.NotifyIcon用ShowBalloonTip方法就可以啊
      

  2.   

    添加NotifyIcon控件
    notifyIcon1.ShowBalloonTip(气球显示的时间,气球显示的标题,显示的文本,ToolTipIcon.值);
      

  3.   

    System.Windows.Forms.NotifyIcon s = new System.Windows.Forms.NotifyIcon();
      
           
                s.ShowBalloonTip(10,"你好啊","欢迎小雅妹妹", System.Windows.Forms.ToolTipIcon.Info);
      

  4.   


    额……你一再强调是控制台下,我还以为你已经懂得在窗体下怎么用呢……
    System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon();
    ni.Icon = new System.Drawing.Icon(@"E:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary\VS2005ImageLibrary123\VS2005ImageLibrary\icons\WinXP\error.ico");
    //一个图标的路径
    ni.Visible = true;
    ni.ShowBalloonTip(2000, "测试", "测试",System.Windows.Forms.ToolTipIcon.Info );
      

  5.   

    需要添加两个引用:
    System.Windows.Forms
    System.Drawing
      

  6.   

    如果不给Icon属性一个图标的话,就不会出现托盘,也不会有气球……
      

  7.   

    都没用呀  控制台 就和DOS一样   我和老师说 换班  不学C#了  太麻烦了  垃圾的新华学校 你们千万别来学电脑 
      

  8.   

    using System.Windows.Forms
    using System.Drawing
    System.Windows.Forms.NotifyIcon s = new System.Windows.Forms.NotifyIcon();
       
        
    s.ShowBalloonTip(10,"你好啊","欢迎小雅妹妹", System.Windows.Forms.ToolTipIcon.Info);
      

  9.   

    bluceyoung,你没弄过控制台吧。
      

  10.   


    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Windows.Forms;namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                NotifyIcon ni = new NotifyIcon();
                ni.Icon = new System.Drawing.Icon(@"C:\Program Files\Microsoft Office\Office12\msn.ico");
                ni.Visible = true;
                ni.ShowBalloonTip(2000, "title", "content", ToolTipIcon.Info);
                Console.ReadKey();
            }
        }
    }
      

  11.   


    哪有啊 系统土标都在 一个DLL文件里面吧 
      

  12.   


    有的是这样,有的就是ico文件,你搜一下吧
      

  13.   


    刚才发给老师 老师说不合格 不可以这样写  要调用 系统的什么DLL命令 
      

  14.   

    系统的什么DLL命令?你们这作业到底什么需求啊
      

  15.   


    这样真能考得到人吗 Console.ForegroundColor 
     Console.WindowHeight
     Console.WindowWidth
     Console.BufferHeight
     Console.BufferWidth
      

  16.   


    你那么牛 写个我们高班的 syn多段扫描器啊 也用控制台写 直接读txt文本里面的IP段 (N段的) 开放端口自动保存 我们老师说 只有他会写 !!! 
      

  17.   

    .NET是可以做出任何你想要的效果的