


方法:
1、先创建一个 notifyIcon1控件
2、在窗台 SizeChanged 事件中写入如下代码(如下是完整代码)
3、最小化后若需要双击图标显示窗台,可在 notifyIcon1_DoubleClick 事件中写入如下代码:
private void Form1_SizeChanged(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
this.Hide();
this.notifyIcon1.Visible = true;
}
}
本文由技术小学生原创,转载请注明出处:https://blog.tag.gg/showinfo-23-35810-0.html 啊
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
this.Show();
this.WindowState = FormWindowState.Normal;
}



亲爱的:若该文章解决了您的问题,可否收藏+评论+分享呢?
文章评论 本文章有个评论