Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for Visual Basic
' The following code snippet demonstrates how to use the LEADTOOLS DICOM
' DS COM Object (ILEADDicomDS) to get the Value of the Implementation Class
' UID element of a DICOM Directory
Dim DicomDir As New LEADDicomDir
Dim nRetValue As Integer
' Load a DICOMDIR File
nRetValue = DicomDir.LoadDicomDir("C:\Medical Images\DICOMDIR", _
                                  DS_LOAD_CLOSE)
If nRetValue = DICOM_SUCCESS Then
   LEADDicomDS.hDicomDS = DicomDir.hDicomDirDS
   nRetValue = LEADDicomDS.FindFirstElement (TAG_IMPLEMENTATION_CLASS_UID, _
                                              False)
   If nRetValue = DICOM_SUCCESS Then
      LEADDicomDS.GetConvertValue
      ' Display the value of the element
      MsgBox LEADDicomDS.StringValues (0)
      LEADDicomDS.StringValueCount = 0
   End If
End If