public static Point GetCursorPosition()
{
NativeMethods.POINT result;
if (NativeMethods.GetCursorPos(out result))
return result;
else
// Failed to retrieve mouse position
// Simply return (0,0) to continue instead of crashing
return new Point(0,0);
}