标签:style blog color strong io 2014 art ar
public partial class DelegateControlUpdateOne : Window { //创建NotifyIcon对象 NotifyIcon notifyIcon = new NotifyIcon(); Icon ico = new Icon("../../ico/logo_x.ico"); ContextMenu conTextMenu = new ContextMenu(); public DelegateControlUpdateOne() { InitializeComponent(); //按钮 为不可用属性 Hint.IsEnabled = false; //加载图片 notifyIcon.Icon = ico; //隐藏任务栏区图标 this.ShowInTaskbar = false; //图标显示在托盘区 notifyIcon.Visible = true; //添加托盘菜单项 conTextMenu.MenuItems.Add("改变属性"); //托盘菜单项在图标右键时显示 notifyIcon.ContextMenu = conTextMenu; //委托点击事件 notifyIcon.Click += new EventHandler(notifyIcon_Click); } private void notifyIcon_Click(object sender, EventArgs e) { if (Hint.IsEnabled.Equals(true)) { Hint.IsEnabled = false; } else { Hint.IsEnabled = true; } }
public partial class DelegateControlUpdateOne : Window { //创建NotifyIcon对象 NotifyIcon notifyIcon = new NotifyIcon(); Icon ico = new Icon("../../ico/logo_x.ico"); ContextMenu conTextMenu = new ContextMenu(); public DelegateControlUpdateOne() { InitializeComponent();
//按钮 为不可用属性 Hint.IsEnabled = false; //加载图片 notifyIcon.Icon = ico; //隐藏任务栏区图标 this.ShowInTaskbar = false; //图标显示在托盘区 notifyIcon.Visible = true; //添加托盘菜单项 conTextMenu.MenuItems.Add("改变属性"); //托盘菜单项在图标右键时显示 notifyIcon.ContextMenu = conTextMenu; //委托点击事件 notifyIcon.Click += new EventHandler(notifyIcon_Click); } private void notifyIcon_Click(object sender, EventArgs e) { if (Hint.IsEnabled.Equals(true)) { Hint.IsEnabled = false; } else { Hint.IsEnabled = true; } }
11:45:07 public partial class DelegateControlUpdateOne : Window { //创建NotifyIcon对象 NotifyIcon notifyIcon = new NotifyIcon(); Icon ico = new Icon("../../ico/logo_x.ico"); ContextMenu conTextMenu = new ContextMenu(); public DelegateControlUpdateOne() { InitializeComponent();
//按钮 为不可用属性 Hint.IsEnabled = false; //加载图片 notifyIcon.Icon = ico; //隐藏任务栏区图标 this.ShowInTaskbar = false; //图标显示在托盘区 notifyIcon.Visible = true; //添加托盘菜单项 conTextMenu.MenuItems.Add("改变属性"); //托盘菜单项在图标右键时显示 notifyIcon.ContextMenu = conTextMenu; //委托点击事件 notifyIcon.Click += new EventHandler(notifyIcon_Click); } private void notifyIcon_Click(object sender, EventArgs e) { if (Hint.IsEnabled.Equals(true)) { Hint.IsEnabled = false; } else { Hint.IsEnabled = true; } }
}
标签:style blog color strong io 2014 art ar
原文地址:http://www.cnblogs.com/zhubaobao/p/3889797.html