Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
POS open cashier
Message
From
03/05/2007 03:27:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
POS open cashier
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01222098
Message ID:
01222098
Views:
89
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
Map
View

Click here to load this message in the networking platform