You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System.Runtime.InteropServices;
- using System.Windows;
-
- namespace DamnOverSharp.Helpers
- {
- internal static class MouseHelper
- {
- [StructLayout(LayoutKind.Sequential)]
- public struct POINT
- {
- public int X;
- public int Y;
-
- public static implicit operator Point(POINT point)
- {
- return new Point(point.X, point.Y);
- }
- }
-
- [DllImport("user32.dll")]
- public static extern bool GetCursorPos(out POINT lpPoint);
-
- public static Point GetCursorPosition()
- {
- POINT lpPoint;
- GetCursorPos(out lpPoint);
-
- return lpPoint;
- }
- }
- }
|