public static Point GetHwndPos(IntPtr hwnd) { WindowScrape.Types.RECT lpRect = new WindowScrape.Types.RECT(); GetWindowRect(hwnd, out lpRect); return(new Point(lpRect.Left, lpRect.Top)); }
public static Size GetHwndSize(IntPtr hwnd) { WindowScrape.Types.RECT lpRect = new WindowScrape.Types.RECT(); GetWindowRect(hwnd, out lpRect); return(new Size(lpRect.Right - lpRect.Left, lpRect.Bottom - lpRect.Top)); }
public static Size GetHwndSize(IntPtr hwnd) { WindowScrape.Types.RECT lpRect = new WindowScrape.Types.RECT(); GetWindowRect(hwnd, out lpRect); return new Size(lpRect.Right - lpRect.Left, lpRect.Bottom - lpRect.Top); }
private static extern bool GetWindowRect(IntPtr hWnd, out WindowScrape.Types.RECT lpRect);
public static Point GetHwndPos(IntPtr hwnd) { WindowScrape.Types.RECT lpRect = new WindowScrape.Types.RECT(); GetWindowRect(hwnd, out lpRect); return new Point(lpRect.Left, lpRect.Top); }
public static Point GetHwndPos(IntPtr hwnd) { var rect = new RECT(); GetWindowRect(hwnd, out rect); var result = new Point(rect.Left, rect.Top); return result; }
private static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);
private static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
public static Size GetHwndSize(IntPtr hwnd) { var rect = new RECT(); GetWindowRect(hwnd, out rect); var result = new Size(rect.Right - rect.Left, rect.Bottom - rect.Top); return result; }