When dragging an object, what is the best/easiest way to determine if there is another object at the current mouse point (i.e. at the mouse point under the dragged object)?

The view has DragsRealTime set to true.

GoDocument.PickObjects (PointF p, bool selectableOnly, IGoCollection coll, int max)

will return a collection objects at the point you specify.

GoDocument.PickObjectsInRectangle will do the same if you are looking for intersection with the dragged object.

Those calls would mostly likely go in a custom GoToolDragging. There are several entries in this forum if you search for GoToolDragging.

Thanks - quick answer.
Another “drag” question:
If an object that just starts to being dragged (first call to OnQueryContinueDrag) is popped to the top of the default layer (Remove(obj) and Add(obj)) will that action break the internal handle of the drag?


I think that’s safe. I’d test it, but I’m heading out for some vacation…