ExportToPicture Method

Allows in-memory access to the user's selection in the viewer control, as an image, through the IPictureDisp interface.

expression.ExportToPicture(CopyAnnotation, AlwaysKeepAnnotationColor)

*expression   * Required. An expression that returns an IMiSelectableImage object.

CopyAnnotation    Optional Long. Specifies whether to export annotations. 1 = True, 0 = False. Default is 1 (True).

AlwaysKeepAnnotationColor    Optional Long. Specifies whether to retain the color of annotations when exporting them. 1 = True, 0 = False. If no value is provided, False is assumed.

Remarks

For additional information on the IPictureDisp automation interface, please see the "COM" section of the Microsoft Windows Platform SDK.

Example

The following example uses the ExportToPicture method to display the user's selection in the viewer control as an image in a separate PictureBox control.

Sub TestExportToPicture()

  Dim miImageSel As MODI.IMiSelectableImage
  
  Set miImageSel = MiDocView1.ImageSelection
  Set picImageSel.Picture = miImageSel.ExportToPicture
  
  Set miImageSel = Nothing

End Sub

Applies to | IMiSelectableImage Object