(摘自http://www.cnblogs.com/zfking/archive/2006/09/17/506762.aspx
一、添加notifyIcon控件

二、加入方法

//实现.net系统托盘

//隐藏程序显示托盘,notifyIcon 是.net自带的NotifyIcon控件,要显示托盘需要设置notifyIcon的显示图标

//没有要显示的图标,托盘是不会显示的

 private void menuItem13_Click(object sender, System.EventArgs e)
  {
            notifyIcon1.Visible = true;
            this.Hide();   
  }

//点击托盘后显示程序窗体

private void notifyIcon1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
  {
                                   this.Show();
                        this.WindowState = FormWindowState.Maximized;
                        notifyIcon1.Visible = false;
                        this.ShowInTaskbar = true;
      }

相关文章:

  • 2022-12-23
  • 2021-11-06
  • 2021-10-20
  • 2021-12-06
  • 2021-10-27
  • 2022-01-09
  • 2022-01-12
猜你喜欢
  • 2021-09-24
  • 2022-02-28
  • 2021-08-08
  • 2021-11-05
  • 2021-06-12
相关资源
相似解决方案