Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPhysicalCursorPos #2830

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

GetPhysicalCursorPos #2830

bbday opened this issue Feb 1, 2017 · 5 comments
Labels
Milestone

Comments

@bbday
Copy link

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
Copy link
Collaborator

thoemmi commented Feb 1, 2017

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

@punker76
Copy link
Member

punker76 commented Feb 1, 2017

@thoemmi
Copy link
Collaborator

thoemmi commented Feb 1, 2017

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

@bbday
Copy link
Author

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
@garsia0
Copy link

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
Labels
Development

No branches or pull requests

4 participants