Software Developer's Kit - ChemDraw

Send comments on this topic
DataObject Property
See Also 


Member of ChemDrawCtl.

Returns the DataObject object of the control.

Property type

Read-only property


Visual Basic
Public Property DataObject() As DataObject

Return Type


The DataObject object is used for specifying formats and data that will be supported for OLE (object linking and embedding) drag and drop operations, basically to transport data from one component to another.


'requires the following sentence
 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
newData As Variant
         'retrieves data from a DataObject object
         newData = ChemDrawCtl.DataObject.GetData(newDataType)
     End If
 End Sub

See Also