Programmer's Guide
POSjet
®
1500
Codes and Commands
Nov-07
Rev M
Page 81
Printing via POSPrinter OCX
See the documentation that comes with the POSPrinter OCX for detailed information on all the function calls that
can be made with the POSPrinter OCX.
Dim StrData As String
Result = POSPrinter1.SetHandshake(2)
'Result = POSPrinter1.OpenPort("LPT1:", "")
Result = POSPrinter1.OpenPort("COM2:", "baud=9600 parity=N data=8 stop=1")
If Result <> 1 Then
MsgBox "OpenPort failed, make sure no other devices are using this port."
End If
StrData = "Hello World" + Chr(13) + Chr(10)
Result = POSPrinter1.SendString(StrData, Len(StrData))
If Result <> 1 Then
MsgBox "SendString failed, Ensure that the printer is connected to the port."
End If
Result = POSPrinter1.SendString(Chr(5) + Chr(21), 2)
StrData = POSPrinter1.ReadString(100)
Result = POSPrinter1.ClosePort()
Содержание POSJET 1500
Страница 1: ...PROGRAMMER S GUIDE POSjet 1500 PN 20 03398 Rev M Nov 2007...
Страница 14: ......