Appendix B – Sample Programs
Class Series 2 Programmer’s Manual
171
‘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 = PrintLabelEnd Sub
‘Display the record form on the screen
Private Sub Form_Load()
Fixed = Itm1 & Chr$(13) & Chr$(13) & Qty1 & Chr$(13) & Chr$(13)
& BoxPos1 & Boxsize & Chr$(13)
CharSet = Chr$(126)
‘Alternate <stx> character ~
MComm.PortOpen = 1
‘Open the serial port
End Sub
‘Exit the program by clicking Exit button with the mouse
Private Sub cmdExit_Click()
Comm1.PortOpen = 0
‘Close down the serial port
End
End Sub
VB Application interfacing via Windows Driver
Create a form similar to the one shown here.
VERSION 5.00
Begin VB.Form Form1
Caption = “Datamax Test Print”
ClientHeight = 1065
ClientLeft = 60
ClientTop = 345
ClientWidth = 2325
LinkTopic = “Form1”
MaxButton = 0 ‘False
MinButton = 0 ‘False
ScaleHeight = 1065
ScaleWidth = 2325
Содержание A-Class
Страница 2: ......
Страница 3: ......
Страница 5: ......
Страница 6: ......
Страница 22: ...Overview 8 Class Series 2 Programmer s Manual ...
Страница 30: ...Immediate Command Functions 16 Class Series 2 Programmer s Manual ...
Страница 138: ...Extended System Level Command Functions 124 Class Series 2 Programmer s Manual ...
Страница 160: ...Label Formatting Command Functions 146 Class Series 2 Programmer s Manual ...
Страница 180: ...Generating Label Formats 166 Class Series 2 Programmer s Manual ...
Страница 192: ...Appendix B Sample Programs 178 Class Series 2 Programmer s Manual ...
Страница 200: ...Appendix D Reset Codes 186 Class Series 2 Programmer s Manual ...
Страница 212: ...Appendix E Single Byte Symbol Sets 198 Class Series 2 Programmer s Manual ...
Страница 264: ...Appendix G Bar Code Details 250 Class Series 2 Programmer s Manual ...
Страница 284: ...Appendix J General Purpose Input Output Port Applications 270 Class Series 2 Programmer s Manual ...
Страница 296: ...Appendix O UPC A and EAN 13 Variable Price Weight Bar Codes 282 Class Series 2 Programmer s Manual ...
Страница 308: ...Appendix Q Plug and Play IDs 294 Class Series 2 Programmer s Manual ...
Страница 312: ...Appendix R Line Mode 298 Class Series 2 Programmer s Manual ...
Страница 324: ...Appendix T WiFi Region Country Codes 310 Class Series 2 Programmer s Manual ...
Страница 328: ...Appendix U Display Icon Key and Control Panel Button Sequence Functions 314 Class Series 2 Programmer s Manual ...
Страница 334: ......