Getting an overlay bitmap list Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type "AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub GettingOverlayBitmapList()
   Dim iRet As Short
   Dim OverlayAttributesDS As LTRASTERPROCLib.LEADOverlayAttributes
   Dim GroupNumber As Integer
   Dim bIsOverlayInDataSet As Boolean
   Dim cs As String

   iRet = LEADDICOM1.GetOverlayAttributes(0, 0)
   If (iRet <> 0) Then
      MessageBox.Show("error")
      Exit Sub
   End If
   OverlayAttributesDS = LEADDICOM1.OverlayAttributes
   cs = LEADDICOM1.OverlayActivationLayer(0)
   MessageBox.Show(cs)

   iRet = LEADDICOM1.GetOverlayBitmapList(0, 0, OverlayAttributesDS.NumberFramesInOverlay, 0)
   If (iRet <> 0) Then
      MessageBox.Show("error")
      Exit Sub
   End If
   LEADRasterView1.Raster.BitmapList = LEADDICOM1.OverlayBitmapList
End Sub