在运行时更改控件的父级 VB.NET
我正在制作一个可以拖动的自定义控件,它是半透明的。我需要它,以便在它移动时(mousemove 事件),如果它与一个控件相交,那么它的父控件就会成为该控件。我试图让它遍历所有控件和 if control.bounds.intersectswith me.clientrectangle then me.parent = control type
事情,但它不起作用。任何帮助将不胜感激。
I'm making a custom control that can be dragged around and it is semi transparent. I need it so that while it is moving (the mousemove event) that if it intersects a control that its parent becomes that control. I tried to have it iterate through all the controls and if control.bounds.intersectswith me.clientrectangle then me.parent = control type
thing, but it did not work. Any help would be appreciated thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您同时引用了原始父级和新父级,因此请执行以下操作:
Since you have references to both the original parent and the new parent, do the following: