How to make printout using C#. At the moment I would like to make printouts of text contents only. That is something similar to Notepad, but the print actions would be executed when a Form Button is clicked.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you just want to be able to print a short, simple text string, try something like this code:
The documentation for the
PrintDocumentclass contains a more comprehensive sample that can be easily modified to print the text from your textbox instead from a file on disk.Both sets of code will send the print job to your default printer, but you can modify them to show a print dialog box and allow the user to choose which printer to use, among other parameters.