[英]How to minimiz a Form to Sys Tray on Closing Event in .NET
如何最小化.NET中关闭事件的系统托盘表格
请帮忙.....
向表单添加一个NotifyIcon控件,并为FormClosing添加一个事件处理程序:
private void Form1_FormClosing(Object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
e.Cancel = true;
this.Visible = false;
this.notifyIcon1.Visible = true;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.