Appendix B – Sample Programs
Class Series Programmer’s Manual
153
‘Print label by clicking print button with the mouse
Private Sub cmdPrint_Click()
‘font name as seen in application font list box
‘if not found, driver will inform GDI to generate an
‘image that will be downloaded
Printer.FontName = cmboFonts.Text
‘1,440 twips equals one inch
Printer.Height = 6480 ‘4.5 inches in twips
Printer.Width = 5760 ‘4 inches in twips
Printer.CurrentX = 1440 ‘1 inch (column position)
Printer.CurrentY = 2160 ‘2 inches (row position)
Printer.Print “0123456789”
Printer.EndDoc
End Sub
Private Sub Form_Load()
Dim X As Printer
Dim I As Integer ‘Used for the font list
‘ search for printer queue name / driver name
For Each X In Printers
If X.DeviceName = “Datamax I-4206” Then ‘printer found
‘ Set printer as system default.
Set Printer = X
For I = 0 To Printer.FontCount - 1 ‘ Determine number of fonts.
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.
Summary of Contents for A-Class A-4310
Page 2: ......
Page 4: ......
Page 15: ...xi Appendix V 281 Bar Code Symbology Information Resources 281 Glossary 283...
Page 16: ...xii...
Page 30: ...Immediate Command Functions 14 Class Series Programmer s Manual...
Page 52: ...System Level Command Functions 36 Class Series Programmer s Manual...
Page 144: ...Label Formatting Command Functions 128 Class Series Programmer s Manual...
Page 162: ...Generating Label Formats 146 Class Series Programmer s Manual...
Page 182: ...Appendix D Reset Codes 166 Class Series Programmer s Manual...
Page 192: ...Appendix E Single Byte Symbol Sets 176 Class Series Programmer s Manual...
Page 236: ...Appendix G Barcode Details 220 Class Series Programmer s Manual...
Page 242: ...Appendix I Symbol Sets and Character Maps 226 Class Series Programmer s Manual...
Page 272: ...Appendix P UPC A and EAN 13 256 Class Series Programmer s Manual...
Page 282: ...Appendix R Plug and Play IDs 266 Class Series Programmer s Manual...
Page 296: ...Appendix U WiFi Region Country Codes 280 Class Series Programmer s Manual...
Page 302: ...Glossary 286 Class Series Programmer s Manual...