using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Resources; namespace SysShow { public partial class Form1 : Form { private NotifyIcon nIcon; public Form1() { InitializeComponent(); this.nIcon = new NotifyIcon(); ResourceManager manager = new ResourceManager(typeof(Properties.Resources)); Icon icon = (Icon)manager.GetObject("e"); nIcon.Text = "测试用"; this.nIcon.Icon = icon;//图标 this.nIcon.Visible = true;//设置图标可见 // 设置系统菜单 ContextMenu cm = new ContextMenu(); //添加托盘菜单项 cm.MenuItems.Add(new MenuItem("测试博客")); cm.MenuItems.Add(new MenuItem("第二个")); //托盘菜单项在图标右键时显示 nIcon.ContextMenu = cm; //托盘图标加载时提示 nIcon.ShowBalloonTip(0x2710, "系统托盘提示", "右击显菜单,左击到博客。", ToolTipIcon.Info); nIcon.Click += new EventHandler(this.nIcon_Click);//委托点击事件 } private void nIcon_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("http://blog.csdn.net/firetaker"); } } } 注意:一定要添加ico图标到本工程目录中 新建文件夹入:rec ,拷贝ico文件到rec中,拖动rec中的图标到Resources.resx的设计模式上 以上就完成了在系统托盘中显示醒目的图片