Printing Via Posprinter Ocx - TransAct POSjet 1500 Programmer's Manual

Transact posjet 1500: software guide
Hide thumbs Also See for POSjet 1500:
Table of Contents

Advertisement

®
Programmer' s Guide
POSjet
1500
Codes and Commands

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()
Nov-07
Rev M
Page 81

Advertisement

Table of Contents
loading

Table of Contents