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

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -