コード例 #1
0
        internal static Point GetMousePosition()
        {
            var w32Mouse = new Platform.Structs.Point();

            User32.GetCursorPos(ref w32Mouse);
            return(new Point(w32Mouse.X, w32Mouse.Y));
        }
コード例 #2
0
        internal static Point GetCursorPos()
        {
            var point1 = new Platform.Structs.Point
            {
                X = 0,
                Y = 0
            };
            var point2 = new Point();

            if (!User32.GetCursorPos(ref point1))
            {
                return(point2);
            }
            point2.X = point1.X;
            point2.Y = point1.Y;
            return(point2);
        }