Printing directly to LPT/COM

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I have this in VB6

Open "lpt1" For Output As #1
Print #1, "abc"
Close (1)

How to do this in VB.NET? I am trying with FileOpen but it doesnt work. Can
anyone help?

Thanks
 
Hi,

There are a couple of ways.

You can download IONet.dll from my homepage (a device driver wrapper that
allows direct access to physical LPT ports, but not virtual ones, such as
USB), or: http://support.microsoft.com/kb/322090/en-us

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Tony said:
I have this in VB6

Open "lpt1" For Output As #1
Print #1, "abc"
Close (1)

How to do this in VB.NET? I am trying with FileOpen but it doesnt work.
Can anyone help?


You're best off asking this in a dotnet newsgroup.
 
MikeD said:
You're best off asking this in a dotnet newsgroup.


Duh! I now see you did crosspost to a dotnet newsgroup. For the record, the
microsoft.public.vb.* newsgroups are for VB6 and earlier. In the future,
please don't include them in crossposts for dotnet-related questions.
Thanks!
 
Duh! I now see you did crosspost to a dotnet newsgroup. For the record, the
microsoft.public.vb.* newsgroups are for VB6 and earlier. In the future,
please don't include them in crossposts for dotnet-related questions.
Thanks!

Now I'm confused. Isn't this a dotnet newsgroup?
 
steve907 said:
Now I'm confused. Isn't this a dotnet newsgroup?

There is no "this", there's a "these" -- two incompatible groups.

The OP cross-posted to two NGs. Groups with "dotnet" in their names
are indeed for dotnet. Groups with just ".public.vb." in their names
are not. Hence the confusion.

Just to clarify: microsoft.public.vb.winapi is NOT a dotnet group.
 
Back
Top