private static Point GetMousePosition() { Point point = new Point(); bool success = WinAPIDeclarations.GetCursorPos(ref point); return(point); }
private static IntPtr GetWindowUnderCursor() { Point point = new Point(); bool success = WinAPIDeclarations.GetCursorPos(ref point); return(WinAPIDeclarations.WindowFromPoint(point)); }