有没有方法将Form放到系统托盘里,并且在使用alt+tab切换任务时,该Form不显示在其中?

解决方案 »

  1.   

    使用NotifyIcon组件放到窗体上,设置其Icon为指定的一个图标文件。
    然后使用如下语句隐藏窗体就可以了:
    this.WindowState = FormWindowState.Minimized;
    this.ShowInTaskbar = false;
      

  2.   

    hbxtlhx(平民百姓-自已动手,丰衣足食) ,你的方法有两个问题:1,双(单)击右下角的图标窗体不显示;2,使用alt+tab切换任务时,该Form显示在其中;
      

  3.   

    hbxtlhx(平民百姓-自已动手,丰衣足食) ,你的方法有两个问题:1,双(单)击右下角的图标窗体不显示;2,使用alt+tab切换任务时,该Form显示在其中;===================================================================
    问题1  是你的新要求而已.
    2 Alt+Tab Form 没有显示在其中...显然是你自己的问题.
      

  4.   

    NotifyIcon控件有单击及双击事件,可以在这些事件里显示出窗体如果Form没有必要显示,可以在使用Hide把它隐藏掉。
      

  5.   

    相关代码:this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
    ================
    private void showFormNormal(object sender , System.EventArgs e ){
    //this.TrayIcon.Visible = false;
    this.TrayIcon.Click -= new System.EventHandler ( this.showFormNormal );
    this.TrayIcon.Click += new System.EventHandler ( this.miniSizeForm );
    this.Show();
    this.WindowState = System.Windows.Forms.FormWindowState.Normal;
    } private void miniSizeForm(object sender , System.EventArgs e ){
    this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
    this.TrayIcon.Click -= new System.EventHandler ( this.miniSizeForm );
    this.TrayIcon.Click += new System.EventHandler ( this.showFormNormal );
    }
      

  6.   

    晕,缩到托盘后,打不开怎么使用啊?总不能"缩"进去就不出来喽!哈哈......算是我的新问题,请给我解一下,另外我不知道使   用alt+tab切换任务时,该Form显示在其中,请指教.谢谢!