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; }
winform最小化后隐藏到右下角,单击或双击后恢复
最新推荐文章于 2021-03-31 15:56:54 发布