473,805 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send codes to a Printer

JC
How do I send escape codes to the printer

I used to be able to do Printer.Print chr$(27) & chr$(71) & "20" and get it
to send. Of course this was vb but there should be some method of talking to
a printer.

thanks,
jc
Nov 17 '05 #1
2 2383
JC wrote:
How do I send escape codes to the printer

I used to be able to do Printer.Print chr$(27) & chr$(71) & "20" and get
it to send. Of course this was vb but there should be some method of
talking to a printer.


I'm not sure if it can actually be used for sending escape codes to a
printer, but if you want to print take a look at the
System.Drawing. Printing namespace. Got to love it! The interface is great.

Max

Nov 17 '05 #2
JC,
Look for topics on printing directly to a printer in either
codeproject.com or C# Corner www.c-sharpcorner.com.
An example would be the article in
http://www.c-sharpcorner.com/Code/20...rintDirect.asp.

Ron Allen
"JC" <st**********@h otmail.com> wrote in message
news:ul******** ******@tk2msftn gp13.phx.gbl...
How do I send escape codes to the printer

I used to be able to do Printer.Print chr$(27) & chr$(71) & "20" and get
it to send. Of course this was vb but there should be some method of
talking to a printer.

thanks,
jc

Nov 17 '05 #3

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

Similar topics

1
4072
by: Ellie | last post by:
I'm stumped. We're building a Struts app running on Websphere on Win2k, with a SQL Server backend. They want pdf files stored in the database; they're in there as Image datatypes. My mission is to grab the pdf(s) from the resultset and send it/them directly to the user's printer. I've found some nifty command-line solutions that allow printing of a FILE, but I'm looking for a solution that basically allows me to print a...
0
1201
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 data to receipt printer '************************************************************************ Private Sub cmdPrintReceipt_Click() Printer.CurrentX = 0: Printer.CurrentY = 0 Printer.FontName = "Arial"
1
4414
by: Richard Johnson | last post by:
I am a C++ newbie and am trying to send simple text data to my local printer. My printer is a USB printer and I have tried the following code using my USB port. This code executes but does not send anything to the printer. I have checked my printer ports and the name I have in the code is the same as is listed on the printer port.The code is as follows: file.open("USB-Compaq_A3000"); file << "Hello World" << std::endl; file.close;
3
4121
by: RC | last post by:
I am using docmd.printout to send Reports (formatted as labels) to a barcode label printer. I need to collate the labels so that I print lable 1 twice, then label 2 twice, then label 3 twice, etc. The printout collate option only seems to work if the printer supports it. The label printer I am using doesn't collate via the printout command option, but it does have a command language that will collate IF I can find a way to send the...
0
23517
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
13
21716
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual data in the string being sent to the printer. However, if I prompt the user for data or if I insert data from a particular record/field in a form Access crashes/closes on its own. I have included the code below, if anyone has any suggestions,...
1
1812
by: Hector M Banda | last post by:
Hi all, Need advice on how to send output to a tiket printer using VB2005. I cannot figure out how to send scape sequences to change fonts, etc. I am using a generic printer driver but no luck. -hb
1
6011
by: remya1000 | last post by:
how to send a .txt file to a printer. after creating a .txt file i need to send that .txt file to a printer.using vb.net and while sending that file to printer i need to tell, which printer i need to send. and i can't used printdialog, to select to which printer i need to send and number of pages and all. everything i need to hardcode. after creating a .txt file, hardcode to which printer i need to send the data and just send to printer. ...
2
1875
by: =?Utf-8?B?T2xleGFuZHIgS3JhdmV0cw==?= | last post by:
Harry, Did you find any examples? I just need to make similar functionality and don't know how to start ... Any help will be helpful. Thanks, Olexandr ! "Harry Simpson" wrote:
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10613
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.