Wrong Mouse position with different DPI settings in WPF -


i using below code current mouse position in wpf application.

system.drawing.point _point = system.windows.forms.control.mouseposition; 

this works good. when user has 125% display settings in machine (windows 7), mouse position wrong. doing wrong?

see if in blog or blog helps , since using wpf try using mouse.getposition in modified msdn example:

// displayarea main window , txtboxmouseposition // textbox used display position of mouse pointer.  private void window_mousemove(object sender, mouseeventargs e) {     point position = mouse.getposition(this);     txtboxmouseposition.text = "x: " + position.x + "\n" + "y: " + position.y;  } 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -