C#winform 里面怎样点击标题栏的关闭按钮后,窗口不关闭,而是最小化啊(象MSN一样),用于及时通讯的客户端程序里面,谢谢大家了
解决方案 »
- 急,office07 添加excel引用TlbImp.exe 在哪里下载啊?
- 先有一个datatable在dataset中 想把它插入到sql中的某个表 该如何操作啊
- 看看这个简单代码什么意思
- 怎么用水晶报表在同一行打印多条记录
- 怎样格式化录入日期到TextBox中
- 不知道大家谁有这个电子书《Microsoft Visual C# .NET 2003开发技巧大全》
- 求助关于"日本商品" 这个词SEO优化如何用文字式的链接在论坛中出现呢
- 如何快速的转换这个时间值,在线等
- 用户要求如下,请各位给点建议我如何实现,要用到什么技术,在线等待
- 如何让VC#作的程序在没有安装.net框架上的机器上运行?
- 疑惑?关于Remoting
- c#操作MS ProjectServer2003,求相关技术文档
{
this.Hide ();
e.Cancel =true;
}
private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
{
this.Show ();
this.WindowState =FormWindowState.Normal;
}或者为NotifyIcon添加ContextMenu:
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.notifyIcon1.ContextMenu = this.contextMenu1;
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem1, this.menuItem2});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "打开";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "关闭";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);private void menuItem1_Click(object sender, System.EventArgs e)
{
this.Show ();
}private void menuItem2_Click(object sender, System.EventArgs e)
{
this.Close ();
Application.Exit ();
}