C# how to print from my app?

C#

I have added a nav bar to my small GUI app and added the word print - how do I make it print to whatever is the default printer? Code appreciated. Looking for simple and best way.

Karl66
Karl66Asked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
Do you need to create a form with PrintPreview and a PrintDocument?

Bob
0
 
Bob LearnedCommented:
What do you want to print?

Bob
0
 
Karl66Author Commented:
A Text window that displays the output based on user generated button clicks. A "general" print function as in "hey they clicked print" so print the richtext1 window or whatever I am currently having them interface with...

Thx,
Karl66
0
 
Karl66Author Commented:
Basically I search a database and dump the results of a sql query to a text box richTextBox1 and then have added a print option in the navigation bar drop down under file. When selected I would like it to print the richTextBox1 contents. However this is done ... I have some googled ideas but I cannot imagine it should be that complex... i.e. :

print.richTextBox1()
0
 
Bob LearnedConnect With a Mentor Commented:
Well, my friend, you are wrong, because it will be that complex.  There isn't any one line method call that will get the job done.  You are going to have to search for printing with the RichTextBox control.

Start here:

How to print the content of a RichTextBox control by using Visual C# .NET or Visual C# 2005
http://support.microsoft.com/kb/812425

Bob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.