Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Open a cash drawer from VB.net (version 7)

Posted on 2004-11-29
2
Medium Priority
?
4,333 Views
Last Modified: 2008-01-09
I am trying to open a cash drawer from my VB.NET appliaction. The answers I have found do not address the new Visual Basic .Net.  IN VB.NET there is no printer object.  I am trying the following...

        ocash = "echo " + Chr(27) + Chr(112) + Chr(0) + Chr(25) + Chr(250) + " > \\SSSCash01\Recibos"
        lng = Shell("cmd /c " + ocash, AppWinStyle.Hide)

This does not work and return no error...

I have also tried this...


        Dim efont As New Font("CONTROL", 10)
        ocash = Chr(27) + Chr(112) + Chr(0) + Chr(25) + Chr(250)
        With e.Graphics
            .DrawString(OCash, efont, Brushes.Black, 10, yPos)


This does not work either....

The printer is an epson TM-U220 and it has a connection (phone style) for the cash register.

Please help...

Mark
0
Comment
Question by:gonzmar6
2 Comments
 
LVL 15

Accepted Solution

by:
SRigney earned 1000 total points
ID: 12699645
Can you build a Batch file that opens the Cash register?  Then you can shell out to the batch file.

Do you have documentation on what you are supposed to send to the printer in order for the cash register to open?  Are you trying to print some escape sequence in order to open the cash register?

0
 

Author Comment

by:gonzmar6
ID: 12701555
Can you build a Batch file that opens the Cash register?  Then you can shell out to the batch file.
....
Yes I could but now the priinter is a netwrok printer... how can I get that to work?

Do you have documentation on what you are supposed to send to the printer in order for the cash register to open?
...

The escape characters above are the ones the doc say I need...Chr(27) + Chr(112) + Chr(0) + Chr(25) + Chr(250)


 Are you trying to print some escape sequence in order to open the cash register?
....

Exactly.... yes...

Need more help...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question