By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,292 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,292 IT Pros & Developers. It's quick & easy.

VB.NET 7, printing to a printer directly

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.