Got panic? ummm its nt that kick... I basically wanted to explain how to send the Direct I/O commands to open the Printer Driven CashDrawer connected to a POS Printer.
Prity simple...
will just paste the code snippet grabbed from my VB (VB6) Code
Private Sub CmdOpenDevice_Click()
OPOSPOSPrinter1.Open("TM-T88IVE") 'Open the PosPrinter
OPOSPOSPrinter1.ClaimDevice(10000) 'Waiting for 10 seconds to get the ctrl
OPOSPOSPrinter1.DeviceEnabled = True
OPOSPOSPrinter1.PrintNormal(2&, Chr(l27) + Chr(112) + Chr(0) + Chr(50) + Chr(250)) 'Key code for the OpenDrawer is 127, 112, 0, 50, 250
End Sub
This will just kick it out
or else, ummm u may use the CashDrawer Service Object
like this
Private Sub OpenDrawer()
OPOSCashDrawer1.Open(StandardE) 'The Name of the device is StandardE
OPOSCashDrawer1.ClaimDevice(10000)
OPOSCashDrawer1.DeviceEnabled = True
OPOSCashDrawer1.OpenDrawer
OPOSCashDrawer1.WaitForDrawerClose(100, 4500, 100, 100)
End Sub
Happy Cording
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment