通知图标在2或3秒钟后消失,我必须重新启动应用程序
我已经尝试过此代码,但无法正常工作
private void Frm_Dashboard_Resize_1(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
Hide();
notifyIcon1.Visible = true;
}
}
private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{
ShowInTaskbar = true;
notifyIcon1.Visible = false;
WindowState = FormWindowState.Normal;
}
答案 0 :(得分:0)
您不是NotifyIcon
双击事件中的showing表单。
将代码更改为-
private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{
Show(); //display the form
this.WindowState = FormWindowState.Normal;
notifyIcon1.Visible = false;
}
此外,请查看ShowBalloonTip方法的备注部分