Software Developer's Kit - ChemDraw

Send comments on this topic
GetData Method
See Also 
Format
The format argument is a number returned from a call to RegisterClipboardFormat().

Description

Member of ChemDraw Control.DataObject.

Retrieves data of a specified format from a DataObject object.

Syntax

Visual Basic
Public Function GetData( _
   ByVal Format As Long _
) As Variant

Parameters

Format
The format argument is a number returned from a call to RegisterClipboardFormat().

Return Type

Remarks

Retrieves data of a specified format from a DataObject object. The format argument is a number returned from a call to RegisterClipboardFormat(). The string used is one of the clipboard formats.

Example

'retrieves data from a DataObject object
 Private Declare Function RegisterClipboardFormat Lib "user32" _
         Alias "RegisterClipboardFormatA" (ByVal lpString As String) As Long

 Private Sub cmdCommand_Click()
     newDataType = RegisterClipboardFormat("ChemDraw InterchangeFormat")
     If  newDataType <> 0 Then
         Dim newData As Variant
         newData = ChemDrawCtl.DataObject.GetData(newDataType)
     End If
 End Sub

See Also