winform最小化后隐藏到右下角,单击或双击后恢复

来源:互联网 发布:淘宝海外商城入驻资格 编辑:程序博客网 时间:2024/05/16 21:45
notifyIcon控件。下面的代码private void MainForm_Resize(object sender, EventArgs e)        {            if (this.WindowState == FormWindowState.Minimized)            {                this.WindowState = FormWindowState.Normal;                notifyIcon1.Visible = true;                this.Hide();                this.ShowInTaskbar = false;            }        }        private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)        {            if (this.ShowInTaskbar == false)                notifyIcon1.Visible = true;                this.ShowInTaskbar = true;                this.Show();                this.Activate();                  this.WindowState = FormWindowState.Normal;                    }

原创粉丝点击