如何在vb.net中的一组坐标中检查哪个坐标靠近我的光标位置 [英] How to check which coordinates is near to my cursor position in a group of coordinates in vb.net

查看:65
本文介绍了如何在vb.net中的一组坐标中检查哪个坐标靠近我的光标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.net中的一组坐标中检查哪个坐标靠近我的光标位置

How to check which coordinates is near to my cursor position in a group of coordinates in vb.net

推荐答案

MAKReddy写了一个不错的小程序将鼠标抓到最近的坐标。我相信你可以使用他的代码做你想做的事情。

我正在开发一个绘制简单点网格的应用程序。我希望鼠标在网格上的点之间捕捉, [ ^ ]
MAKReddy wrote a nice little program snaps the mouse to the closest coordinates. I'm sure you can use his code to do what you want it to do.
I am working on an application which draws a simple dot grid. I would like the mouse to snap between the points on the grid,[^]


计算

< a href =http://en.wikipedia.org/wiki/Euclidean_distance>欧几里德距离 [ ^ ]鼠标光标的所有坐标,并选择距离最小的坐标。
Calculate the
Euclidean distance[^] of all coordinates to the mouse cursor and pick the one with the smallest distance.


这篇关于如何在vb.net中的一组坐标中检查哪个坐标靠近我的光标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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