示例#1
0
        public static WindowPosition GetWindowPosition(IntPtr window)
        {
            var rect = new Rect();

            ExternDLLUtilities.GetWindowRect(window, ref rect);
            return(new WindowPosition(rect, GetScalingFactor()));
        }
示例#2
0
        /// <summary>
        /// returns width as item 1 and height as item 2
        /// </summary>
        /// <returns></returns>
        public static Tuple <int, int> GetApplicationSize(IntPtr window)
        {
            var rect = new Rect();

            ExternDLLUtilities.GetWindowRect(window, ref rect);
            var windowPosition = new WindowPosition(rect, GetScalingFactor());

            Logger.Info(windowPosition);
            return(new Tuple <int, int>(windowPosition.Width, windowPosition.Height));
        }