Home All Groups Group Topic Archive Search About

Sending CHR(7) to cash drawer to Open

Author
25 Oct 2006 3:01 AM
Hector M Banda
Hi all,
How can I send chr(7) thru VB2005 using the parallel port?


BTW This is for a POS system.
Thanks,

-hb

Author
25 Oct 2006 4:46 AM
Mike C#
Sounds like you want to send raw data to the parallel port; maybe treat it
like a printer?  Here's a couple of links that might be helpful:
http://support.microsoft.com/kb/138594/
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=325408&SiteId=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=320932&SiteId=1

There's also a section or sending raw data to a printer with VB2005 in this
book:  http://www.oreilly.com/catalog/vb2005ckbk/toc.html, although I
haven't read it myself.  Might be worth browsing through at the local
bookstore if you have time.

Show quoteHide quote
"Hector M Banda" <hec***@mxlweb.com> wrote in message
news:eu4NnH%239GHA.3348@TK2MSFTNGP03.phx.gbl...
> Hi all,
> How can I send chr(7) thru VB2005 using the parallel port?
>
>
> BTW This is for a POS system.
> Thanks,
>
> -hb
>
Author
25 Oct 2006 6:56 PM
Theo Verweij
Try:
    Shell("cmd /c@echo " & chr(7) & " > lpt1:"

Hector M Banda wrote:
Show quoteHide quote
> Hi all,
> How can I send chr(7) thru VB2005 using the parallel port?
>
>
> BTW This is for a POS system.
> Thanks,
>
> -hb
>
>
Author
27 Oct 2006 6:04 PM
Theo Verweij
Just found that the following worked under VB6 - try it in .net (and let
us know if it still works)

Dim fn As Integer
     fn = FreeFile()

     Open "LPT1:" For Output As #fn
     Print #fn, "your data here"
     Close #fn

Theo Verweij wrote:
Show quoteHide quote
> Try:
>     Shell("cmd /c@echo " & chr(7) & " > lpt1:"
>
> Hector M Banda wrote:
>> Hi all,
>> How can I send chr(7) thru VB2005 using the parallel port?
>>
>>
>> BTW This is for a POS system.
>> Thanks,
>>
>> -hb
>>
Author
25 Oct 2006 10:16 PM
Dick Grier
Hi,

You can download IONet.dll from my homepage.  This would allow you to bypass
Windows and send the data directly.  However, there are other ways:

http://support.microsoft.com/kb/154078

for example.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.