Software Developer's Kit - ChemDraw

Send comments on this topic
DataObject Property
See Also 

Description

Member of ChemDrawControl.Objects.

Returns the DataObject from the collection of objects

Property type

Read-only property

Syntax

Visual Basic
Public Property DataObject() As DataObject

Return Type

Remarks

The DataObject object is used for specifying formats and data that will be supported for OLE drag and drop operations.

Example

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

 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