.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Send a "txt" file to a printer.... in vb.net?

15 REPLIES 15
Reply
Message 1 of 16
Anonymous
1175 Views, 15 Replies

Send a "txt" file to a printer.... in vb.net?


I need to figure out how to send a "txt" file (*.txt) to a printer to
be printed.



Pointers (or example code)?



TIA

--

Work: VISTA Ultimate/Windows 7 x32 - AMD
64 X2 Dual Core 4200 2.2GHz, 4 Gigs Ram, GeForce
6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150

15 REPLIES 15
Message 2 of 16
Anonymous
in reply to: Anonymous

C Witt wrote:

> I need to figure out how to send a "txt" file (*.txt) to a printer to
> be printed.

You should be able to load it into a RichTextBox and find lots of
examples of printing that on the web.

Terry
Message 3 of 16
Anonymous
in reply to: Anonymous


I was hoping to avoid doing it that way.   the richtextbox always
screws up the formatting..  (tabs and spaces)



Work: VISTA
Ultimate/Windows 7 x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs
Ram, GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Terry W. Dotson wrote:

C Witt wrote:



I need to figure out how to send a "txt" file (*.txt) to a printer to
be printed.



You should be able to load it into a RichTextBox and find lots of
examples of printing that on the web.

Terry


Message 4 of 16
Anonymous
in reply to: Anonymous

C Witt wrote:

> I was hoping to avoid doing it that way. the richtextbox always
> screws up the formatting.. (tabs and spaces)

Set the font to Courier New or any monospaced font.

Terry
Message 5 of 16
Anonymous
in reply to: Anonymous

The MSDN docs for the PrintDocument class includes an example that shows how
to print a .txt file.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"C Witt" wrote in message
news:6162095@discussion.autodesk.com...
I was hoping to avoid doing it that way. the richtextbox always screws up
the formatting.. (tabs and spaces)


Work: VISTA Ultimate/Windows 7 x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs
Ram, GeForce 6800GS 256MB
Home: VISTA Ultimate x64 - AMD 64 Quad Core 2.2GHz, 8 Gigs Ram, GeForce
8600GT 512MB
Laptop (17" HP): VISTA Premium x32 - AMD Turion X2 Dual Core TL-50 1.6GHz, 2
Gigs Ram, Nvidia GeForce 6150


Terry W. Dotson wrote:
C Witt wrote:

I need to figure out how to send a "txt" file (*.txt) to a printer to
be printed.

You should be able to load it into a RichTextBox and find lots of
examples of printing that on the web.

Terry
Message 6 of 16
Anonymous
in reply to: Anonymous

There's no need for these VB-style hacks in .NET.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


"Terry W. Dotson" wrote in message
news:6162173@discussion.autodesk.com...
C Witt wrote:

> I was hoping to avoid doing it that way. the richtextbox always
> screws up the formatting.. (tabs and spaces)

Set the font to Courier New or any monospaced font.

Terry
Message 7 of 16
Anonymous
in reply to: Anonymous

Tony Tanzillo wrote:

> There's no need for these VB-style hacks in .NET.

If the end results are the same and the time difference is immeasurable,
who really cares how it got there.

Terry
Message 8 of 16
Anonymous
in reply to: Anonymous


You need to learn not to react when you perceive that Tony has attacked you. The reason I say that is because when you react you have obviously had your ego dented and are trying to protect it but you make yourself look stupider in the process.

Message 9 of 16
Anonymous
in reply to: Anonymous

Hi NathTay,

Gee!! Are you Tony's psychiatrist or something?

Not everything that Tony posts should be subject to the "God has spoken"
attitude you seem to implying.

Regards,


Laurie Comerford


NathTay wrote:
>
> You need to learn not to react when you perceive that Tony has attacked
> you. The reason I say that is because when you react you have obviously
> had your ego dented and are trying to protect it but you make yourself
> look stupider in the process.
>
Message 10 of 16
Anonymous
in reply to: Anonymous

No I just do not hold a grudge against Tony like you and Terry seem to. Despite what you think I was not sticking up for Tony or implying he is god.



Your amazingly quick response is quite disturbing but since you have spoken up I would suggest you take the advice I gave Terry.



When you, Terry and some others are attacked or perceive to be attacked you react to protect your ego regardless of whether you are correct or not which just makes you look stupider when you are not correct.



I know you think Terry is god and that Tony and I are both the devil so I am waiting for another quick response that makes you look even stupider than you already look.
Message 11 of 16
Anonymous
in reply to: Anonymous

>> If the end results are the same....

That's the problem. You've never used the API I suggested
the OP look at, and probably didn't even know it existed, so
from your perspective the 'end results are the same', which
is simply not the case (sorry, no time for a lesson).

You should expect this kind of thing to happen often here, if
you insist on operating with the mentality that suggests .NET
is just some sort of incremental update of VB6/VBA.

There are some particiapants here who actually want to learn,
rather than just hack/kludge their way through every problem,
and do that only to perpetuate an illusion.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
Message 12 of 16
Anonymous
in reply to: Anonymous

NathTay wrote:

> I know you think Terry is god and that Tony and I are both the devil

Based on that statement you need to be seeking counseling instead of
giving it. From your previous post "make yourself look stupider in the
process"

Terry
Message 13 of 16
Anonymous
in reply to: Anonymous


I'll see what I can dig up.   ty for the pointer.



Work: VISTA
Ultimate/Windows 7 x32 - AMD 64 X2 Dual Core 4200 2.2GHz, 4 Gigs
Ram, GeForce 6800GS 256MB


Home: VISTA Ultimate x64 - AMD 64 Quad
Core 2.2GHz, 8 Gigs Ram, GeForce 8600GT 512MB


Laptop (17" HP): VISTA Premium x32 -
color="#000000">AMD Turion X2 Dual Core TL-50 1.6GHz, 2 Gigs Ram,
color="#666666">Nvidia GeForce 6150





Tony Tanzillo wrote:

The MSDN docs for the PrintDocument class includes an example that shows how 
to print a .txt file.



Message 14 of 16
Anonymous
in reply to: Anonymous

I am glad you took my advice regarding Tony. Now you need to apply it to everyone.



Laurie took 5 minutes to kiss your *** and criticise myself. My statement was a play on Lauries comments but clearly you are to stupid to see that hence why I gave my original advice to you. Once again you have made yourself look stupider in the process of reacting to a damaged ego.
Message 15 of 16
Anonymous
in reply to: Anonymous

NathTay wrote:

> I am glad you took my advice regarding Tony.

NathTays.Advice + Tonys.Opinion = Nothing.ToTerry

Terry
Message 16 of 16
Anonymous
in reply to: Anonymous

Sorry obviously I now must be the stupid one. What does that mean?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost