473,386 Members | 1,758 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,386 software developers and data experts.

VB.NET 7, printing to a printer directly

Hi folks,

I wish to print on pre-printed continuous forms on a dot
matrix printer.

My initial intent was to access to printer directly (in raw
mode, somehow) in order to send whatever is necessary to do
the job.

I had to try... but FileOpen does not permit opening LPT1.

From what I gatter (I may understand this incorrectly) the
printdocument component seems to be a graphical approach at
printing on modern cut-sheet printers (laser, inkjet).

The only aspects of printing I need are to send appropriate
text, CR/LFs, formfeeds and CPI settings all the while using
the printer's default power-on font.
Alternatively, I have a back door, but it's not elegant.

1) Create a textfile.txt via VB with the appropriate
print data.

2) Shell("printit.bat", AppWinStyle.Hide)

3) printit.bat contains: copy /b textfile.txt lpt1:
Any help to get me on the right track here would be more than
welcomed.

Thanks
Jul 21 '05 #1
2 3660
Marc,
Take a look at this article
http://www.c-sharpcorner.com/Code/20...rintDirect.asp for information
on printing directly to the printer. You should be able to adapt this to
VB.NET.

Ron Allen
"Marc Champagne" <ne**@ctldirect.DOT.com.invalid> wrote in message
news:Xn**********************************@207.35.1 77.135...
Hi folks,

I wish to print on pre-printed continuous forms on a dot
matrix printer.

My initial intent was to access to printer directly (in raw
mode, somehow) in order to send whatever is necessary to do
the job.

I had to try... but FileOpen does not permit opening LPT1.

From what I gatter (I may understand this incorrectly) the
printdocument component seems to be a graphical approach at
printing on modern cut-sheet printers (laser, inkjet).

The only aspects of printing I need are to send appropriate
text, CR/LFs, formfeeds and CPI settings all the while using
the printer's default power-on font.
Alternatively, I have a back door, but it's not elegant.

1) Create a textfile.txt via VB with the appropriate
print data.

2) Shell("printit.bat", AppWinStyle.Hide)

3) printit.bat contains: copy /b textfile.txt lpt1:
Any help to get me on the right track here would be more than
welcomed.

Thanks

Jul 21 '05 #2
"Ron Allen" <rallen@_nospam_src-us.com> wrote in
news:#q**************@TK2MSFTNGP09.phx.gbl:
Hi folks,

I wish to print on pre-printed continuous forms on a dot
matrix printer.

My initial intent was to access to printer directly (in
raw mode, somehow) in order to send whatever is necessary
to do the job.

I had to try... but FileOpen does not permit opening LPT1.

From what I gatter (I may understand this incorrectly) the
printdocument component seems to be a graphical approach
at printing on modern cut-sheet printers (laser, inkjet).

The only aspects of printing I need are to send
appropriate text, CR/LFs, formfeeds and CPI settings all
the while using the printer's default power-on font.
Alternatively, I have a back door, but it's not elegant.

1) Create a textfile.txt via VB with the appropriate
print data.

2) Shell("printit.bat", AppWinStyle.Hide)

3) printit.bat contains: copy /b textfile.txt lpt1:
Any help to get me on the right track here would be more
than welcomed.

Thanks


Marc,
Take a look at this article
http://www.c-sharpcorner.com/Code/20...rintDirect.asp
for information on printing directly to the printer. You
should be able to adapt this to VB.NET.

Ron Allen
"Marc Champagne" <ne**@ctldirect.DOT.com.invalid> wrote in
message
news:Xn**********************************@207.35.1 77.135...


Thanks, will give it a try, seems complex though.

--
Marc Champagne
marcch.AT.videoSPAMNOTtron.DOT.ca.invalid
Montreal, Canada
Jul 21 '05 #3

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

Similar topics

2
by: Ryan Gregg | last post by:
I've got a dot matrix printer that I need to print a line at a time to. This is being used for an audit log on an application and every event that occurs needs to print out right as it occurs. ...
4
by: IntraRELY | last post by:
Hello All, I am developing a Web Application in VB.NET. We are printing checks from a IE 6.0. Here are our requirments: 1. Checks will be printed on pre-printed stock, so we must format the...
2
by: kmtai | last post by:
vb --- Open "lpt1" For Output As #FileNu Print #FileNum, "abcd and some chinese characters --- Only a-z and 0-9 will be printed
2
by: Marc Champagne | last post by:
Hi folks, I wish to print on pre-printed continuous forms on a dot matrix printer. My initial intent was to access to printer directly (in raw mode, somehow) in order to send whatever is...
0
by: Mike9900 | last post by:
We are developing a point of sale software and need to work with receipt printers. We need to send texts to the printer directly in desired fonts. We are able to send texts to the printer using...
5
by: Raman | last post by:
Hello friends, I want to print an ID card. I have one Windows Form that contains front and back side. The printer is printing both front and back side at a time. I am trying to send both sides...
3
by: mike19182004 | last post by:
How do we print programs directly from Turbo C++ 3.0 compiler? I have tried the print function from file menu of compiler ,but it does not print!!!
0
by: Matt | last post by:
I am using Process.Start() and pdfp.exe to launch Adobe Reader to print PDFs directly from the server. My website's Application Pool runs under a domain account and I am having trouble getting the...
0
by: silverrock7 | last post by:
Hello Friends i m stuck up to a place wherein i want to print a report which is displaying on a reportviewer. I actually want to send the report to printer directly without viewing it. i am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.