1,wrting text file
2,show text file in the print preview
3,print the same file
Windows, C#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hiren SoniRank #694 · 3.5K reputationPosted Dec 8, 2009, 3:32 AM EST
Sreekanth199 reputationPosted Dec 11, 2009, 6:50 PM EST
Mahesh ChandRank #1 · 393.3K reputationPosted Dec 12, 2009, 7:31 AM EST
Step 1. To write to a text file, here is an article:
Step 2. To view a text file, you open a new window and use RichTextBox control to view the file. Make it read-only so it will be more like a preview mode. Here is an article:
Syntax Highlighting in Rich TextBox Control - Part 1
Step 3. Print a text file:
Printing in C# and .NET