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.
Since you have references to both the original parent and the new parent, do the following:
OriginalParent.controls.remove(YourControl)
NewParent.controls.add(YourControl)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With