Click here to Skip to main content
15,740,620 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

I am just starting out with printing in VB.Net.

I have had a look around and seem to find a lot of information around System.Drawing.Printing which I have played around with. But I can not figure out how to pass a string to that to print. Something as simple as:

dim Text as String = "This is test text"

System.Drawing.Printing.(PrintText) "I know printtext is not a function" = Text

Am I looking in the wrong spot to do what I want to do, System.Drawing.Printing only seems to support printing out a file that already exists.



I found this[^] with google.
Share this answer
Zac Newman 31-Jul-12 1:17am    
Thanks for confirming what I was doing, after a heap of time wasted I figured out that it was .Net not wanting to play with shared printers which was leading to my issues.
You will need to research the PrintDocument. The PrintDocument object has a PrintPage event that you handle and has a graphics object that you can draw text, shapes, images on.[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900