获取mousemovent-以英寸为单位? [英] Get mousemovent - in inches?

查看:101
本文介绍了获取mousemovent-以英寸为单位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我当时正在考虑制作一个小应用程序,该程序可以计算您的鼠标移动的距离.距离不应以像素为单位,而应以英寸或米为单位.

但这有可能吗?您无法将像素转换为ince,并且不同的计算机具有不同的鼠标设置等.

有什么好主意吗? :)

谢谢!

Hi.

I was thinking about making a little app that calculated how long a distance you are moving with your mouse. The distance should not be in pixels, but in inches or meters.

But is this even possible? You cant convert pixels to inces, and different computers have different mouse settings etc.

Any good ideas? :)

Thanks!

推荐答案

您当然可以将它们转换.您可能需要找到显示器的dpi,以便发现多少像素消耗了一英寸的显示器空间. (而且我认为您对毫米的兴趣并没有像毫米一样多.)
Of course you can convert them. You may need to find the dpi of your monitor so that you can discover how many pixels consume an inch of monitor space. (And I don''t think you''re really interested in meters as much as you are in millimeters.)


您可能会得到一个线索或两个 ^ ].
You might get a clue or two here[^].


感谢您的回答:)

看来,最精确,最简单(又笨拙)的方法是让用户使用卷尺测量显示器尺寸的高度和宽度,然后根据这些数据和分辨率计算距离.

谢谢:)
Thanks for your answers :)

It seems like the only most precise, easy (and clumsy) way, is to make the user measure the height and width of his monitor size with a measuring tape, and then calculate the distance from these data and the resolution.

Thanks :)


这篇关于获取mousemovent-以英寸为单位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆