winform中控制碰撞

发布于 2024-08-04 15:26:23 字数 110 浏览 1 评论 0原文

我这里有一个应用程序,我让用户在表单上拖动链接标签,但是当他们拖动的链接标签接触表单上的另一个控件时,我需要能够执行一些操作。有人能指出我正确的方向吗?或提供任何建议/意见?

非常感谢 贾斯

i have an app here and i let the user drag link labels around on the form, but i need to be able to do stuff when the linklabel they are dragging around touches another control on the form. can anybody please point me in the right direction? or offer any suggestions/advice?

thanks lots
jase

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短叹 2024-08-11 15:26:23

您可以使用 Rectangle.IntersectsWith用于检测碰撞的控件的Bounds

You could possibly use Rectangle.IntersectsWith on the Bounds of the controls to detect collision.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文