473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Printing Escape codes to a printer

I need to send printer specific escape codes a printer for a POS register. Can anyone tell me how to send these codes to a printer using VB .NET and the Win32 spooler functions? I have looked at the MS article 322090 on how to do this but the supplied code doesn't work for the second button. Please let me know if there are any other resources on Windows printing. It would be greatly apreciated. Thanks for any and all help.
Nov 20 '05 #1
1 2427
Hi,

I have looked at the MS article 322090 on how to do this but the supplied
code doesn't work for the second button.
<<

What do you mean, "second button?" Does this refer to a specific command
that you must issue to the printer?

When I do this, I bypass the spooler and write directly to the printer IO
port (much faster than using the spooler). I use the DriverLinx PortIO
driver (free, but requires registration with SST). I have VB6 code that
does this, and I've though of porting it to .NET (this is an hour or two of
work that I haven't had time for).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Brian Hanson | last post by:
Hi, I am trying to programmatically print a pdf file via an asp.net application. I have seen other postings that mention the following code used or something similar to it in a vb.net app. ...
1
by: PW | last post by:
I have to setup a point-of-sale system for a friend. He has a PC, barcode scanner, receipt printer and cashdrawer. The receipt printer connects to the serial port. The cashdrawer connects to...
0
by: Samuel Lee | last post by:
Could anyone convert the following vb 6.0 codes into vb.net version? '************************************************************************ '** Button to print a sales receipt - spool print...
2
by: David Cuffee | last post by:
I am not having any luck printing a simple text file with PCL codes to my windows printer. If I have a text file with PCL codes and I want to dump that file to my default windows printer, how would...
6
by: Rand | last post by:
Hello anyone, Situation: I want to print 1 or x mailing continuous form labels 1" X 3.5" then change to a different name and print again. Everything works fine except for problem below. ...
5
by: Tom | last post by:
I am converting an old application that was printing directly to a specialized printer device (i.e. a special label printer). It was doing this by opening a file with the file path of 'LPT1:' and...
1
by: Paul H | last post by:
I am developing a database where some reports need to print to a laser and some need to print to a dot matrix printer. I am not interested in how to do this programmatically, I will let the user...
0
by: mottebelke | last post by:
I want to print a bitmap directly to a network printer using a socket. To do this I use PCL codes to set the printer in the right mode and print the image. Note that this code is used on the...
1
by: sathyp | last post by:
Public Function SetPrinterDefaultsW(ByVal sPrinterName As String, _ ByVal nPaperSize As Long, ByVal nOrientation As Long) As Boolean Dim Prn As Printer Dim hPrinter As Long Dim pd As...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.