MoveFirstTag Example for Visual Basic
Private Sub Command10_Click()
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVETAGERROR
LEADDICOM1.MoveFirstTag
DisplayItem
MsgBox "wait"
LEADDICOM1.MoveNextTag
DisplayItem
MsgBox "wait"
LEADDICOM1.MoveLastTag
DisplayItem
MsgBox "wait"
LEADDICOM1.MovePrevTag
DisplayItem
MsgBox "wait"
MOVETAGERROR:
End Sub
Private Sub DisplayItem()
Dim szItem As String
Dim szItemL As String
Dim szItemR As String
Dim nLen As Integer
Dim x As Integer
LEADDICOM1.EnableMethodErrors = True
On Error GoTo DISPLAYERROR
szItem = Hex$(LEADDICOM1.CurrentTag.Code)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
Text1.Text = szItemL & ":" & szItemR
szItem = Hex$(LEADDICOM1.CurrentTag.Mask)
nLen = Len(szItem)
szItemR = Right$(szItem, 4)
szItemL = ""
For x = nLen To 7
szItemL = szItemL & CStr(0)
Next
szItemL = szItemL & Left$(szItem, nLen - 4)
Text2.Text = szItemL & ":" & szItemR
Text3.Text = LEADDICOM1.CurrentTag.Name
Select Case LEADDICOM1.CurrentTag.VR
Case VR_AE
Text4.Text = "AE"
Case VR_AS
Text4.Text = "AS"
Case VR_AT
Text4.Text = "AT"
Case VR_CS
Text4.Text = "CS"
Case VR_DA
Text4.Text = "DA"
Case VR_DS
Text4.Text = "DS"
Case VR_DT
Text4.Text = "DT"
Case VR_FD
Text4.Text = "FD"
Case VR_FL
Text4.Text = "FL"
Case VR_IS
Text4.Text = "IS"
Case VR_LO
Text4.Text = "LO"
Case VR_LT
Text4.Text = "LT"
Case VR_OB
Text4.Text = "OB"
Case VR_OW
Text4.Text = "OW"
Case VR_PN
Text4.Text = "PN"
Case VR_SH
Text4.Text = "SH"
Case VR_SL
Text4.Text = "SL"
Case VR_SQ
Text4.Text = "SQ"
Case VR_SS
Text4.Text = "SS"
Case VR_ST
Text4.Text = "ST"
Case VR_TM
Text4.Text = "TM"
Case VR_UI
Text4.Text = "UI"
Case VR_UL
Text4.Text = "UL"
Case VR_UN
Text4.Text = "UN"
Case VR_US
Text4.Text = "US"
Case VR_UT
Text4.Text = "UT"
Case Else
Text4.Text = CStr(LEADDICOM1.CurrentTag.VR)
End Select
Text5.Text = LEADDICOM1.CurrentTag.MinVM
Text6.Text = LEADDICOM1.CurrentTag.MaxVM
Text7.Text = LEADDICOM1.CurrentTag.DivideVM
DISPLAYERROR:
End Sub