Picture property

Microsoft Visio Developer Reference

Picture property

   Example   

Returns a picture that represents an enhanced metafile (EMF) contained in a master, shape, selection or page.

Version Added

2002

Syntax

objRet = object.Picture

objRet

An IPictureDisp object that represents the enhanced metafile.

object

Required. An expression that returns a Master, Shape, Selection, or Page object that contains the picture.

Remarks

The Picture property returns only EMF files (enhanced metafiles).

COM provides a standard implementation of a picture object with the IPictureDisp interface on top of the underlying system picture support. The IPictureDisp interface exposes a picture object's properties and is implemented in the stdole type library as a StdPicture object creatable within Microsoft Visual Basic. The stdole type library is automatically referenced from all Visual Basic for Applications projects in Visio.

To get information about the StdPicture object that supports the IPictureDisp interface:

  1. On the Tools menu, point to Macros, and then click Visual Basic Editor.
  1. On the View menu, click Object Browser.
  1. In the Project/Library list, click stdole.
  1. Under Classes, examine the class named StdPicture.

For details about the IPictureDisp interface, see the Microsoft Platform SDK on the Microsoft Developer Network (MSDN) Web site.

Currently, only in-proc solutions can use the Picture property because the IPictureDisp interface cannot be marshaled.