Viewer.ShapeAtPoint Property
Visio Viewer |
Gets the ID of the shape in the drawing open in the Microsoft Office Visio 2007 Viewer, at the specified point in the Viewer window, in the coordinate system of the Viewer window, measured in pixels. Read-only.
Version Information
Version Added: Visio 2007
Syntax
expression.ShapeAtPoint(X, Y)
expression An expression that returns a Viewer object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
X | Required | Long | The x-coordinate of the point, in pixels. |
Y | Required | Long | The y-coordinate of the point, in pixels. |
Return Value
Long
Remarks
The origin of the coordinate system of the Viewer window is the upper left-hand corner. The positive x-direction is to the right, and the positive y-direction is down.
If there is no shape at the specified point, the ShapeAtPoint property returns 0.
Example
The following code gets the ID of the shape at point (200, 200) in the drawing open in the Viewer.
Visual Basic for Applications |
---|
|