winform 窗体不显示在任务管理器里

  protected override CreateParams CreateParams
  {
      get
      {
          const int WS_EX_APPWINDOW = 0x40000;
          const int WS_EX_TOOLWINDOW = 0x80;
          CreateParams cp = base.CreateParams;
          cp.ExStyle &= (~WS_EX_APPWINDOW);
          cp.ExStyle |= WS_EX_TOOLWINDOW;
          return cp;
      }
  }

  

posted @ 2023-08-22 17:06  willamyao  阅读(47)  评论(0编辑  收藏  举报