public static WindowInfo GetWindowInfo(WindowHandle windowHanle) { RECT rc = new RECT(); Win.GetWindowRect(windowHanle.hWnd, ref rc); int width = rc.Right - rc.Left; //窗口的宽度 int height = rc.Bottom - rc.Top; //窗口的高度 int x = rc.Left; int y = rc.Top; return(new WindowInfo() { hWnd = windowHanle, Height = height, Width = width, X = x, Y = y, // WinImage = image }); }