winform中控制碰撞
我这里有一个应用程序,我让用户在表单上拖动链接标签,但是当他们拖动的链接标签接触表单上的另一个控件时,我需要能够执行一些操作。有人能指出我正确的方向吗?或提供任何建议/意见?
非常感谢 贾斯
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Rectangle.IntersectsWith用于检测碰撞的控件的
Bounds
。You could possibly use Rectangle.IntersectsWith on the
Bounds
of the controls to detect collision.