Robert:
From V2000 and later, you probably are best served in this area by the
Shape.SpatialXxx
properties, which can tell you about overlapping and find neighbors
directly.
These are based on geometry rather than bounding box. (Note that
bounding box
only coincides with the visible geometry for rectangle shapes.)
If you absolutely have to use bounding box, then the method described
elsewhere
in this thread looks pretty reasonable.
Graham
Quote:
> Does anyone have a code snippet that, given two objects, will tell if one is
> overlapping the other?
> Thanks,
> Rob Hutchison
--
--------------------------------------------
Graham Wideman
MS MVP for Visio
Books:
Visio 2000 Developer's Survival Guide
Visio 2002 Developer's Survival Pack (with Tools)
... and resources for programmable diagramming at:
http://www.diagramantics.com
--------------------------------------------
Unoffical Visio FAQ:
http://www.diagramantics.com/diagenvs/visio/faq/index.htm
(Remove the obvious to email me)
---------------------------------------------