;

Open A Cash Drawer With VB.NET

The following routine opens a cash drawer using VB.Net. Most cash drawers are attached to a recipt printer through what looks to be a phone jack. To open the cash drawer the POS software must send "control codes" to your printer which will then send an impulse to the cash drawer to pop it open. The problem is that the POS software has to know the proper control code to send to the receipt printer that you are using. It seems like every receipt printer uses a different code. You can find the "open cash drawer" code by looking in the printer's manual, calling the printer's manufacturer, or it may be listed at the bottom of this page.


Code:

Public Sub open_cashdrawer()
        Dim intFileNo As Integer = FreeFile()
        FileOpen(1, "c:\escapes.txt", OpenMode.Output)
        PrintLine(1, Chr(27) & "p" & Chr(0) & Chr(25) & Chr(250))
        FileClose(1)
        Shell("print /d:lpt1 c:\escapes.txt", vbNormalFocus)
End Sub

1 comment:

Post Comments


Do you have any suggestions ? Add comment. Do not spam!

Search By Google

About this blog

Vision and Mission
Assist each company to improve efficiency and effectiveness to achieve the objectives to serve clients in a professional, objective and sustainable and provide the best solutions for businesses in solving problems in the procurement of informatics and technology.

Excellence
With support from experts and experienced professionals and geared towards fulfilling the needs of clients who put quality in a cost competitif. We also work as partners culter tailored to your company's corporate and can also provide an applicable and practical advice for clients.

New

 

WELCOME

Welcome to the Thomas IPT Blog - Thank you being here, and hope you come back often. Please surf here and read more about the world of computers and various articles of the world that I experienced. There are many things about, you'll probably find something interesting.

ABOUT ME

Working as a Management Information System Design And Development Operations Accounting. Specializing in the manufacture of Retail Database Desktop Applications, ERP / MRP, KSP / KSU, Warehouse, etc by using VB, SQL, Access, Crystal Report

NAVIGASI

SOCIAL STUFF

Info