MagTek MTMICRImage User Manual
Page 26

MTMicrImage.OCX
22
Private Sub cmdGetAllTags_Click()
Dim ReturnVal As Variant
Dim FieldCount As Integer
Dim i As Integer
Dim TagNum As Long
LogStatus "Getting All Tags in file " & txtFileName.Text & ": "
ReturnVal = MICRImage.EnumTiffTags(txtFileName.Text, txtIFD.Text)
If IsArray(ReturnVal) Then
FieldCount = UBound(ReturnVal)
LogStatus "There are " & FieldCount & " Tags"
For i = 1 To FieldCount
TagNum = MICRImage.GetTiffTagNumByIndex(txtFileName.Text, i, txtIFD.Text)
LogStatus " Tag # " & TagNum & "= " &
MICRImage.GetTiffTagByNumber(txtFileName.Text, TagNum, txtIFD.Text)
Next
Else
LogStatus "There are No Tags in IFD " & txtIFD.Text & " in file " & txtFileName.Text
End If
End Sub
Private Sub cmdGetTagByNum_Click()
LogStatus "Getting Tag By Tag Number:"
txtTagOutput.Text = MICRImage.GetTiffTagByNumber(txtFileName.Text,
txtTagNum.Text, txtIFD.Text)
End Sub
Private Sub cmdPortOpen_Click()
If Not (MICRImage.PortOpen) Then
MICRImage.CommPort = txtCommPort.Text
MICRImage.Settings = txtSettings.Text
End If
MICRImage.PortOpen = Not MICRImage.PortOpen
If MICRImage.PortOpen Then
LogStatus "Port Opened"
cmdPortOpen.Caption = "Close Port"
If MICRImage.DSRHolding Then
LogStatus "Device Attached"
'Displays Current Switch Settings
'If you use the MICRImage.Save command then these do not need to be sent
'every time you open the device
MICRImage.MicrTimeOut = 1