http://www.csdn.net/Develop/read_article.asp?id=20312
这是孟大哥的文章,你看看吧,包括了你要的系统托盘合windows service

解决方案 »

  1.   

    在任务栏右边显示托盘小图标,使用NotifyIcon控件就可以了。
    如果还要让窗体最小化后隐藏,在Form1_Resize事件中添加下面的代码:
    private void Form1_Resize(object sender, System.EventArgs e)
    {
    if(this.WindowState==FormWindowState.Minimized)
    {
    this.Visible=false;
    }
    }
      

  2.   

    在工具箱里面拖一个notifyIcon对象到设计窗体中,并对它进行编程。
    支持的事件有:click,doubleclick,mouse_down,mouse_move,mouse_up等。
      

  3.   

    用notifyIcon,工具栏里找!托放到窗体中。
      

  4.   

    用notifyIcon,工具栏里找!托放到窗体中。
      

  5.   

    在工具箱里面拖一个notifyIcon对象到设计窗体中, Visible设为false,然后添加以下事件
    //最小化到托盘
    private void Form1_Resize(object sender, System.EventArgs e) 
    {
    if (this.WindowState == FormWindowState.Minimized) 
    {
    this.Visible = false;
    notifyIcon1.Visible = true;
    //notifyIcon1.ShowBalloon("欢迎使用", "", NotifyIconEx.NotifyInfoFlags.Info,1);此处为扩展控件实现XP气球效果的功能,标准控件无法使用
    }
    }
    //单击托盘图标返回
    private void notifyIcon1_Click(object sender, System.EventArgs e) 
    {
    this.Visible = true;
    this.WindowState = FormWindowState.Normal;
    notifyIcon1.Visible = false;
    }