public static void ScreenToClient(IntPtr hwnd, ref int x, ref int y) { User.Struct.POINT point = new User.Struct.POINT(); point.x = x; point.y = y; Win32.User.ScreenToClient(hwnd, ref point); x = point.x; y = point.y; }
public static void GetScreenCoordinates(IntPtr HwndPtr, ref int x, ref int y) { User.Struct.POINT point = new User.Struct.POINT(); point.x = x; point.y = y; Win32.User.ClientToScreen(HwndPtr, ref point); x = point.x; y = point.y; }