方法:
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;
}
}
本文由301免备案跳转原创,转载请注明出处:https://www.zfcdn.xyz/showinfo-23-35810-0.html 啊
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
this.Show();
this.WindowState = FormWindowState.Normal;
}
亲爱的:被墙域名跳转TG:@qianhenetwork QQ:851617266,可否收藏+评论+分享呢?
文章评论 本文章有个评论