AdvancedLauncher.Tools.Extensions.HwndSourceExtensions.TransformScreenToClient C# (CSharp) Метод

TransformScreenToClient() публичный статический Метод

Transform a point from "screen" coordinate space into the "client" coordinate space of the window.
public static TransformScreenToClient ( this hwndSource, Point point ) : Point
hwndSource this
point System.Windows.Point
Результат System.Windows.Point
        public static Point TransformScreenToClient(this HwndSource hwndSource, Point point)
        {
            HWND hwnd = new HWND(hwndSource.Handle);

            POINT pt = new POINT();
            pt.x = (int)point.X;
            pt.y = (int)point.Y;

            NativeMethods.ScreenToClient(hwnd, ref pt);

            return new Point(pt.x, pt.y);
        }