By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,236 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Sending CHR(7) to cash drawer to Open

P: n/a
Hi all,
How can I send chr(7) thru VB2005 using the parallel port?
BTW This is for a POS system.
Thanks,

-hb
Oct 25 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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/Sho...25408&SiteId=1
http://forums.microsoft.com/MSDN/Sho...20932&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.

"Hector M Banda" <he****@mxlweb.comwrote in message
news:eu****************@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

Oct 25 '06 #2

P: n/a
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

Oct 25 '06 #3

P: n/a
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.
Oct 25 '06 #4

P: n/a
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:
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
Oct 27 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.