Specifications

-
59
-
12.2 Example of program by Visual Basic
Following is the Visual Basic 6.0 program list for “CITIZEN CT-S2000” to utilize various printing and
special functions.
' Set “CT-S2000“ as default printer driver
Dim X As Printer
For Each X In Printers
If X.DeviceName = “CITIZEN CT-S2000” Then
Set Printer = X
Exit For
End If
Next
‘Printing Windows font
Printer.FontSize=10
Printer.FontName=Arial”
Printer.Print “Font Arial / Size 10”
‘Printing Printer font
Pritner.FontSize=12
Printer.FontName=”15 cpi”
Printer.Print “15 cpi / Size 12”
‘Printing Barcode
Printer.FontSize=42
Printer.FontName=”Code39”
Pritner.Print “ABC123456”
‘Opening cash drawer
Printer.FontSize=12
Pritner.FontName=”Control”
Printer.Print “A ‘Drawer 1 at 50ms
‘Cutting paper
Printer.FontSize=12
Pritner.FontName=”Control”
Printer.print “P” Partial cut
‘Printing graphic data from NV memory
Printer.FontSize=12
Pritner.FontName=”Control”
Printer.print “G” ‘Print #1 gaphic data in NV memory
Printer.EndDoc
Also you can send commands through driver but it is necessary to choose printer font first.
(Please use this way at your own risk. We do not recommend this usage.)
(ex)
Pritner.FontSize=12
Printer.FontName=”15 cpi”
Printer.Print CHR$(&H1B) + “V” + CHR$(1) ‘90 degrees right turned.
Printer.Print “15 cpi / Size 12”
Printer.EndDoc
Caution: PrintDocument object of Visual Basic.Net etc does not support printer font. Therefore
the above method using printer font cannot be used.