printing to LPT1... driving me nuts!!!

  • Thread starter Thread starter TimB
  • Start date Start date
T

TimB

I am trying to send a control string to the LPT1 port. I have no problem
doing it in VB6... but for the life of me I can't do it in VB.NET.

All I get is an error with the code below... HELP ME PLEASE.



FileOpen(1, "LPT1", OpenMode.Output, OpenAccess.Write)

PrintLine(1, Chr(27) & Chr(112) & Chr(0) & Chr(48))

PrintLine(1, Chr(27) & Chr(112) & Chr(1) & Chr(49))

FileClose(1)



Thanks,

TimB
 
Hi,

See http://support.microsoft.com/?scid=kb;EN-US;322090

If this doesn't work for you, I have a .NET dll that is a wrapper for a
device driver that allows direct access to a STANDARD (not USB) printer
port.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top