private NativeMethods.CursorPoint getPoint(
double X,
double Y,
int intHandle)
{
var p = new NativeMethods.CursorPoint {X = (int) X, Y = (int) Y};
if (intHandle == 0) return p;
try { // Windows Vista or higher only
var handle =
new IntPtr(intHandle);
NativeMethods.PhysicalToLogicalPoint(handle, ref p);
}
catch {
}
/*
NativeMethods.CursorPoint p = new NativeMethods.CursorPoint {X = (int) X, Y = (int) Y};
if (intHandle == 0) return p;
try { // Windows Vista or higher only
IntPtr handle =
new IntPtr(intHandle);
NativeMethods.PhysicalToLogicalPoint(handle, ref p);
}
catch {
}
*/
/*
if (intHandle != 0) {
try { // Windows Vista or higher only
IntPtr handle =
new IntPtr(intHandle);
NativeMethods.PhysicalToLogicalPoint(handle, ref p);
}
catch {
}
}
*/
return p;
}