Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
POS open cashier
Message
De
03/05/2007 03:27:48
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
POS open cashier
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01222098
Message ID:
01222098
Vues:
88
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform