Export (0) Print
Expand All

Visual Basic Reference

Visual Studio 6.0

SetData Method

See Also    Example    Applies To

Puts a picture on the Clipboard object using the specified graphic format. Doesn't support named arguments.

Syntax

object.SetData data, format

The SetData method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
data Required. A graphic to be placed on the Clipboard object.
format Optional. A constant or value that specifies one of the Clipboard object formats recognized by Visual Basic, as described in Settings. If format is omitted, SetData automatically determines the graphic 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.

You set the graphic that is to be placed onto the Clipboard object with either the LoadPicture function or the Picture property of a Form, Image, or PictureBox.

Show:
© 2014 Microsoft