Software Developer's Kit - ChemDraw

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

Description

Member of ChemDraw Control.DataObject.

Indicates whether a specified format is supported or not.

Syntax

Visual Basic
Public Function GetFormat( _
   ByVal Format As Long _
) As Boolean

Parameters

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

Return Type

Boolean

Remarks

Determines if a specified clipboard format is supported by the DataObject object.

Example

'determines whether a specified format is supported or not
 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.GetFormat(newDataType)
    End If
End Sub

See Also