I need to print a string from a textbox. The string should print through the default printer weather it is a parallel printer or a usb printer. Can this be done.
BTW..I am using .net Forms
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.
Sure, you can use the
PrintDocumentclass to print arbitrary content.The MSDN page on PrintDocument contains a nice example which prints the contents of a file to the default printer. Adapting this to print the content of a text box instead should be trivial.