Epson TM H6000 Technical Reference - Page 101

Sample Program

Page 101 highlights

TM-H6000II Technical Reference Guide 5.2.2 Sample Program Below is as example of how to use Slip & MICR Combination with OPOS ADK Ver.2.20 SP3. Dim RC As Long Dim I = 1 as Integer 'Return Code OPOSPOSPrinter1.AsyncMode = False 'Paper preparation procedure Do RC = OPOSMICR1.BeginImsertion(3000) If RC = OPOS_SUCCESS Then Exit Do Else If RC = OPOS_E_TIMEOUT Then MsgBox "Please insert a check." Else MsgBox "insert error." Exit Do End If Loop OPOSMICR1.EndInsertion With OPOSPOSPrinter1 'Endorsement Printing .PrinterNormal PTR_S_SLIP, Chr(&H1B) & "Endorsement Printing" & vbLf 'Change of the printing side .ChangePrintSide PTR_PS_SODE1 .PrinterNormal PTR_S_SLIP, Chr(&H1B) & "Slip Printing" & vbLf End With RC = OPOSMICR1.BeginRemoval(3000) If RC = OPOS_E_TIMEOUT Then MsgBox "Please insert a check." Else If RC OPOS_SUCCESS Then MsgBox "remove error." Exit Sub End If Do While OPOSPOSPrinter1.EndRemoval OPOS_SUCCESS MsgBox "Please remove a check." I = I + 1 If I = 5 Then Exit Do Loop Rev. A Application Development Information for OPOS 5-5

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122

Rev. A
Application Development Information for OPOS
5-5
TM-H6000II Technical Reference Guide
5.2.2
Sample Program
Below is as example of how to use Slip & MICR Combination with OPOS ADK Ver.2.20 SP3.
Dim RC As Long
‘Return Code
Dim I = 1 as Integer
OPOSPOSPrinter1.AsyncMode = False
‘Paper preparation procedure
Do
RC = OPOSMICR1.BeginImsertion(3000)
If RC = OPOS_SUCCESS Then
Exit Do
Else If RC = OPOS_E_TIMEOUT Then
MsgBox “Please insert a check.”
Else
MsgBox “insert error.”
Exit Do
End If
Loop
OPOSMICR1.EndInsertion
With OPOSPOSPrinter1
‘Endorsement Printing
.PrinterNormal PTR_S_SLIP, Chr(&H1B) & “Endorsement Printing” & vbLf
‘Change of the printing side
.ChangePrintSide PTR_PS_SODE1
.PrinterNormal PTR_S_SLIP, Chr(&H1B) & “Slip Printing” & vbLf
End With
RC = OPOSMICR1.BeginRemoval(3000)
If RC = OPOS_E_TIMEOUT Then
MsgBox “Please insert a check.”
Else If RC <> OPOS_SUCCESS Then
MsgBox “remove error.”
Exit Sub
End If
Do While OPOSPOSPrinter1.EndRemoval <> OPOS_SUCCESS
MsgBox “Please remove a check.”
I = I + 1
If I = 5 Then Exit Do
Loop