FindLastElement Example for Visual Basic
Private Sub DSDeleteModule_Click()
'Find the last image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to last element in Data Set
LEADDICOM1.MoveLastElement False
LEADDICOM1.FindLastElement TAG_PIXEL_DATA, False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
'find each image
While (True)
LEADDICOM1.FindPrevElement False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
Wend
MOVEELEMENTERROR:
MsgBox "No More Images"
End Sub