<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      C# 設(shè)置桌面為父窗口

      #region 設(shè)置桌面為父窗口
      IntPtr hDesktop;
      public const int GW_CHILD = 5;
      
      public IntPtr GetDesktopHandle(DesktopLayer layer)
      {
      //hWnd = new HandleRef();
      HandleRef hWnd;
      IntPtr hDesktop = new IntPtr();
      switch (layer)
      {
      case DesktopLayer.Progman:
      hDesktop = Win32Support.FindWindow("Progman", null);//第一層桌面
      break;
      case DesktopLayer.SHELLDLL:
      hDesktop = Win32Support.FindWindow("Progman", null);//第一層桌面
      hWnd = new HandleRef(this, hDesktop);
      hDesktop = Win32Support.GetWindow(hWnd, GW_CHILD);//第2層桌面
      break;
      case DesktopLayer.FolderView:
      hDesktop = Win32Support.FindWindow("Progman", null);//第一層桌面
      hWnd = new HandleRef(this, hDesktop);
      hDesktop = Win32Support.GetWindow(hWnd, GW_CHILD);//第2層桌面
      hWnd = new HandleRef(this, hDesktop);
      hDesktop = Win32Support.GetWindow(hWnd, GW_CHILD);//第3層桌面
      break;
      }
      return hDesktop;
      }
      
      public void EmbedDesktop(Object embeddedWindow, IntPtr childWindow, IntPtr parentWindow)
      {
      Form window = (Form)embeddedWindow;
      HandleRef HWND_BOTTOM = new HandleRef(embeddedWindow, new IntPtr(1));
      const int SWP_FRAMECHANGED = 0x0020;//發(fā)送窗口大小改變消息
      Win32Support.SetParent(childWindow, parentWindow);
      Win32Support.SetWindowPos(new HandleRef(window, childWindow), HWND_BOTTOM, 300, 300, window.Width, window.Height, SWP_FRAMECHANGED);
      }
      
      private void button1_Click(object sender, EventArgs e)
      {
      
      }
      
      class Win32Support
      {
      
      [DllImport("user32.dll", CharSet = CharSet.Auto)]
      public static extern IntPtr FindWindow(string className, string windowName);
      [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
      public static extern IntPtr GetWindow(HandleRef hWnd, int nCmd);
      [DllImport("user32.dll")]
      public static extern IntPtr SetParent(IntPtr child, IntPtr parent);
      [DllImport("user32.dll", EntryPoint = "GetDCEx", CharSet = CharSet.Auto, ExactSpelling = true)]
      public static extern IntPtr GetDCEx(IntPtr hWnd, IntPtr hrgnClip, int flags);
      [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
      public static extern bool SetWindowPos(HandleRef hWnd, HandleRef hWndInsertAfter, int x, int y, int cx, int cy, int flags);
      [DllImport("user32.dll")]
      public static extern int ReleaseDC(IntPtr window, IntPtr handle);
      }
      
      public enum DesktopLayer
      {
      Progman = 0,
      SHELLDLL = 1,
      FolderView = 2
      }
      #endregion


      public Form1()
      {
      InitializeComponent();
      this.hDesktop = GetDesktopHandle(DesktopLayer.Progman);
      EmbedDesktop(this, this.Handle, this.hDesktop);
      }

       

       

      posted @ 2021-04-29 09:46  隨遇而安(huangjun)  閱讀(876)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 日韩美女亚洲性一区二区| 精品卡通动漫亚洲AV第一页| 狠狠躁夜夜躁无码中文字幕| 亚洲精品tv久久久久久久| 国内精品久久人妻互换| 国产亚洲欧洲av综合一区二区三区| 激情内射亚洲一区二区三区 | 亚洲成人av在线高清| 国产性一交一乱一伦一色一情| 国产成人无码免费视频在线| 99福利一区二区视频| 日本一区二区三区免费播放视频站| 亚洲精品成人福利网站| 日韩国产精品区一区二区| 国产精品中文字幕视频| 2019久久久高清日本道| 小嫩批日出水无码视频免费| 国产中文字幕在线一区| 国产网友愉拍精品视频手机| 亚洲免费成人av一区| 欧美一本大道香蕉综合视频| 高清有码国产一区二区| 成人看的污污超级黄网站免费| 国产精品一区二区传媒蜜臀| 亚洲精品香蕉一区二区| 国产一区二区波多野结衣| 中文字幕无码免费久久| 日本va欧美va欧美va精品| 孕妇怀孕高潮潮喷视频孕妇| 无码视频一区二区三区| 国产高清自产拍av在线| 国内不卡的一区二区三区| 兴和县| 国产一区二区三区亚洲精品| 欧美成人一区二区三区不卡| 国产精品美女久久久久久麻豆| 国产精品亚洲精品日韩已满十八小| 国产美女午夜福利视频| 超碰人人超碰人人| 亚洲一区久久蜜臀av| 日韩美女视频一区二区三区|