|
-
Aug 3rd, 2007, 02:42 AM
#1
Thread Starter
Junior Member
[RESOLVED] Open Cash Drawer
Hello, I need help, can anyone help me?
I want to open a cash drawer using VB.NET code, but I can't find the proper code. I use EPSON Printer TM-U220, and it's connected to a drawer; the printer itself is connected to the computer using COM port.
I notice the following code works well in VB:
Code:
Printer.FontName = "control"
Printer.Print "A"
Printer.EndDoc
Unfortunately, there's no Printer object in VS 2005, substituted by PrintDocument, but can't find some properties in it.
I found this code, using VB.NET, but it's using LPT1, not COM1. I tried replacing LPT1 with COM1, but failed.
Code:
Dim intFileNo As Integer = FreeFile()
FileOpen(1, "c:\escapes.txt", OpenMode.Output)
PrintLine(1, Chr(27) & Chr(112) & Chr(0) & Chr(25) & Chr(250))
FileClose(1)
Shell("print /d:LPT1 c:\escapes.txt", vbNormalFocus)
Any help would be appreciated.
Thanx
The only thing for the triumph of evil is for a good man to do nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|