SaveDS Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "SaveDlg1" of type "SaveFileDialog" from ".NET Framework".
Private Sub TestSaveDS ( )
   Dim nRet As Short
   'save a Data Set
   LEADDICOM1.EnableMethodErrors = False
   SaveDialog1.Filter = "DICOM Data Set|*.dic"
   SaveDialog1.ShowDialog()
   If (SaveDialog1.FileName <> "") Then
      nRet = LEADDICOM1.SaveDS(SaveDialog1s.FileName, 0)
      If (nRet <> LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS) Then
         MessageBox.Show("Error " & CStr(nRet) & " saveing file!")
      End If
   End If
   LEADDICOM1.EnableMethodErrors = True
End Sub