GetData Method (ActiveX Controls)

       

Returns a graphic from the Clipboard object. Doesn't support named arguments.

Syntax

object.GetData (format)

The GetData method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
format Optional. A constant or value that specifies the Clipboard graphics format, as described in Settings. Parentheses must enclose the constant or value. If format is 0 or omitted, GetData automatically uses the appropriate format.

Settings

The settings for format are:

Constant Value Description
vbCFBitmap 2 Bitmap (.bmp files)
vbCFMetafile 3 metafile (.wmf files)
vbCFDIB 8 Device-independent bitmap (DIB)
vbCFPalette 9 Color palette

Remarks

These constants are listed in the Visual Basic (VB) object library in the Object Browser.

If no graphic on the Clipboard object matches the expected format, nothing is returned. If only a color palette is present on the Clipboard object, a minimum size (1 x 1) DIB is created.