Datamax E4203 User Manual Page 85

  • Download
  • Add to my manuals
  • Print
  • Page
    / 176
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 84
Appendix B
E-Class DPL Programmer’s Manual 75
VB Application Generating DPL
The following sample is a Visual Basic program that displays a database record on the screen. A
user can scroll through the records and then print a selected one. Five barcodes are printed along
with data fields and headings.
‘Printer DPL Controls
Dim CharSet As String ‘<STX> byte
Const StartLabel = “L”
Const EndLabel = “E”
Const PrintDensity = “D11”
‘Printer DPL Data to position dynamic information on label
Const OrderTxt = “191100704150010” ‘font 9, 24 pt
Const OrderBC = “1a6205004200120”
Const CustomerTxt = “191100603600010”
Const Item1NO = “191100403250010”
Const Item1BC = “1a6204002870010”
Const Item1Txt = “191100402690010”
Const Item1Qty = “191100603070260”
‘DPL Fixed Items on label
Const Itm1 = “191100303400010Item #”
Const Qty1 = “191100303400250Quantity”
Const Boxsize = “B065035002002”
Const BoxPos1 = “1X1100003050240”
Const Image1 = “1Y3300004750010SLANT1”
Dim Fixed As String
‘Item Variables
Dim Item1 As String
Dim PrintLabel As String
Dim OrderData As String
‘Print label by clicking print button with the mouse
Private Sub cmdPrint_Click()
‘Concatenate all the dynamic data fields with the constant header
strings, terminated with <cr> Chr$(13)
OrderData = OrderTxt & txtOrderNo.Text & Chr$(13) & OrderBC &
txtOrderNo.Text & Chr$(13) & CustomerTxt & txtCustomer.Text
Item1 = Item1NO & txtItem1.Text & Chr$(13) & Item1BC &
txtItem1.Text & Chr$(13) & Item1Txt & txtItem1Desc.Text & Chr$(13)
& Item1Qty & txtItem1Qty.Text
‘Concatinate entire label format and send out serial port
PrintLabel = CharSet & MaxLength & Chr$(13) & CharSet &
StartLabel & Chr$(13) & PrintDensity & Chr$(13) & Image1 &
Chr$(13) & OrderData & Chr$(13) & Item1 & Chr$(13) & Fixed &
Chr$(13) & EndLabel
Comm1.Output = PrintLabel End Sub
‘Display the record form on the screen
Private Sub Form_Load()
Page view 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 175 176

Comments to this Manuals

No comments