Appendix B – Sample Programs
Class Series 2 Programmer’s Manual
171
cmboFonts.AddItem Printer.Fonts(I) ‘ Put each font into list
box.
Next I
Exit For
End If
Next
End Sub
‘Exit the program and shut down the serial port
‘by clicking Exit button with the mouse
Private Sub cmdExit_Click()
End
End Sub
When the program is run, the combo box should be populated with the available fonts as shown
below.
VB Application to Send Raw Data via Printer Driver
This is a sample Visual Basic program that checks for any printer driver attached to
“LPT1”. If one is installed then a DPL file can be printed via the print driver. **Note that
this does not have to be a Datamax-O’Neil DPL print driver. DPL is created by the
application and sent to LPT1.
To begin, a global variable called SelPrinter must be defined as a string. Then use the
following code to create a .frm file.
VERSION 5.00
Object = “{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0”; “comdlg32.ocx”
Begin VB.Form Form1
Caption = “Form1”
ClientHeight = 1290
ClientLeft = 165
ClientTop = 735
ClientWidth = 3750
LinkTopic = “Form1”
MaxButton = 0 ‘False
MinButton = 0 ‘False
ScaleHeight = 1290
ScaleWidth = 3750
StartUpPosition = 3 ‘Windows Default
Begin MSComDlg.CommonDialog CommonDialog1
Содержание MP Compact4 Mark II
Страница 2: ......
Страница 4: ......
Страница 20: ...Overview 8 Class Series 2 Programmer s Manual...
Страница 28: ...Immediate Command Functions 16 Class Series 2 Programmer s Manual...
Страница 136: ...Extended System Level Command Functions 124 Class Series 2 Programmer s Manual...
Страница 156: ...Label Formatting Command Functions 144 Class Series 2 Programmer s Manual...
Страница 176: ...Generating Label Formats 164 Class Series 2 Programmer s Manual...
Страница 188: ...Appendix B Sample Programs 176 Class Series 2 Programmer s Manual...
Страница 196: ...Appendix D Reset Codes 184 Class Series 2 Programmer s Manual...
Страница 208: ...Appendix E Single Byte Symbol Sets 196 Class Series 2 Programmer s Manual...
Страница 260: ...Appendix G Bar Code Details 248 Class Series 2 Programmer s Manual...
Страница 280: ...Appendix J General Purpose Input Output Port Applications 268 Class Series 2 Programmer s Manual...
Страница 292: ...Appendix O UPC A and EAN 13 Variable Price Weight Bar Codes 280 Class Series 2 Programmer s Manual...
Страница 304: ...Appendix Q Plug and Play IDs 292 Class Series 2 Programmer s Manual...
Страница 308: ...Appendix R Line Mode 296 Class Series 2 Programmer s Manual...
Страница 320: ...Appendix T WiFi Region Country Codes 308 Class Series 2 Programmer s Manual...
Страница 324: ...Appendix U Display Icon Key and Control Panel Button Sequence Functions 312 Class Series 2 Programmer s Manual...
Страница 330: ......