当前位置:编程学习 > C#/ASP.NET >>

关于使用notifyIcon问题

我在窗体中加入notifyIcon
想在窗体最小化的时候隐藏,双击任务图标的时候显示,问题出现在双击任务栏图标的时候窗体显示不正常,隐藏在桌面左侧类似于把QQ窗体拖到桌面左侧隐藏那样,那位高手能帮我解决这个问题,十分感谢。
  private void notifyIcon1_DoubleClick(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Normal;  
            this.Activate();
            this.ShowInTaskbar = true; 
              
         
        }

        private void MainForm_Resize(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.ShowInTaskbar = false; 
            }
        }
--------------------编程问答-------------------- private void notifyIcon1_DoubleClick(object Sender, EventArgs e) 
         {
            if (this.WindowState == FormWindowState.Minimized)        
                this.WindowState = FormWindowState.Normal;
            this.Activate();
            this.ShowInTaskbar = true;
            this.notifyIcon1.Visible = false;
         }
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,