Environment versions
Network:
Windows 2000 Server
Hi everyone,
I have a question for programing with POS cashier
I have some simple code ( VB code ) as below :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for POS Cashier,
' open drawer
Dim hSerialPort, hParallelPort As IntPtr
Dim Success As Boolean
Dim BytesWritten, BytesRead As Int32
Dim Buffer() As Byte
'Declare variables to use for encoding.
Dim oEncoder As New System.Text.ASCIIEncoding
Dim oEnc As System.Text.Encoding =
oEncoder.GetEncoding(1252)
'for star mode
Buffer = oEnc.GetBytes(Chr(28))
hParallelPort = CreateFile("LPT1", GENERIC_READ Or
GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
IntPtr.Zero)
Success = WriteFile(hParallelPort, Buffer, Buffer.Length,
BytesWritten, IntPtr.Zero)
Success = CloseHandle(hParallelPort)
'MsgBox("open drawer")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This VB code is copy from our old system, its work in order.
Please exchage the code into VFP command.
** above code looks quite long, i want to open cashier only **
Thank a lot.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only