GetPhysicalCursorPos #2830

Closed
bbday opened this Issue Feb 1, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@bbday

bbday commented Feb 1, 2017

i Use remotedesktop, how i can fix it?

Uups, this should not happen! Sorry for this exception! Is this maybe happend on a virtual machine or via remote desktop? Please let us know, thx.
at MahApps.Metro.Controls.WinApiHelper.GetPhysicalCursorPos()
at MahApps.Metro.Controls.WinApiHelper.GetRelativeMousePosition(IntPtr hWnd)
at MahApps.Metro.Controls.GlowWindow.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@thoemmi

This comment has been minimized.

Show comment
Hide comment
@thoemmi

thoemmi Feb 1, 2017

Collaborator

What's the version of your operating system? GetPhysicalCursorPos is available since Windows Vista/Windows Server 2008.

Collaborator

thoemmi commented Feb 1, 2017

What's the version of your operating system? GetPhysicalCursorPos is available since Windows Vista/Windows Server 2008.

@thoemmi

This comment has been minimized.

Show comment
Hide comment
@thoemmi

thoemmi Feb 1, 2017

Collaborator

Ok, so it seems to be general issue with remote desktop then 😒

Collaborator

thoemmi commented Feb 1, 2017

Ok, so it seems to be general issue with remote desktop then 😒

@bbday

This comment has been minimized.

Show comment
Hide comment
@bbday

bbday Feb 2, 2017

Windows Server 2012 but i have same issue with W10

bbday commented Feb 2, 2017

Windows Server 2012 but i have same issue with W10

@punker76 punker76 added this to the 1.4.3 milestone Feb 2, 2017

@punker76 punker76 added the Bug label Feb 2, 2017

@punker76 punker76 closed this in 41fd0a4 Feb 2, 2017

@garsia0

This comment has been minimized.

Show comment
Hide comment
@garsia0

garsia0 May 23, 2017

for fix rdp problem change api for
private static bool _GetPhysicalCursorPos(out POINT lpPoint)
{
try
{
lpPoint.x = System.Windows.Forms.Cursor.Position.X;
lpPoint.y = System.Windows.Forms.Cursor.Position.Y;
return true;
}
catch
{
lpPoint = new POINT();
return false;
}

    }

Already tested on Windows XP RDP SP3 NET 4.0

garsia0 commented May 23, 2017

for fix rdp problem change api for
private static bool _GetPhysicalCursorPos(out POINT lpPoint)
{
try
{
lpPoint.x = System.Windows.Forms.Cursor.Position.X;
lpPoint.y = System.Windows.Forms.Cursor.Position.Y;
return true;
}
catch
{
lpPoint = new POINT();
return false;
}

    }

Already tested on Windows XP RDP SP3 NET 4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment