http://expert.csdn.net/Expert/topic/990/990675.xml?temp=.2969629

解决方案 »

  1.   

    在你的托盘程序的双击事件中写上这句:
    this.WindowState = FormWindowState.Normal;
    也就是
    private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    this.WindowState = FormWindowState.Normal;

    }
      

  2.   

    縮小到托盤﹕
    在窗體的Resize事件中處理﹕
    if(this.WindowState==FormWindowState.Minimized)
    {
    this.Visible=false;
    }
    雙擊托盤恢復窗體﹕
    private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    this.Visible=true;
    this.WindowState=FormWindowState.Normal;
    }
    不知能不能得點分﹖
      

  3.   

    整个窗体以图标的形式缩小到右下角托盘
    private void menuItem1_Click(object sender, System.EventArgs e)
    {
    this.Hide();
    this.notifyIcon1.Icon=this.Icon;
    }双击托盘的图标后恢复原窗体
    private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    this.Show();
    }
      

  4.   

    縮小到托盤﹕
    在窗體的Resize事件中處理﹕
    if(this.WindowState==FormWindowState.Minimized)
    {
    this.Visible=false;
    }
    雙擊托盤恢復窗體﹕
    private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    this.Visible=true;
    this.WindowState=FormWindowState.Normal;
    }
    试过了,能用
      

  5.   

    private void Form1_Deactivate(object sender, System.EventArgs e)
    {
    this.Hide;
    } private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
    {
    this.Show;
    this.WindowState=FormWindowState.Normal;
    this.Activate;
    }