Print Preview & Print
-
Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha
-
Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha
If you're talking about using MFC, then I assume you have some version of the visual studios. There are a couple of methods you can use for printing. The first is by using the PrintDocument, PrintDialog, PrintPreviewDialog, and PrintPreviewControls. If you're used to MFC, then you'll think these controls are wonderful...I thought they were much easier to use than the printing functions that MFC provides. The second method is by using the Crystal Reports. If you've never used it before, it'll probably take you a couple of hours to get the hang of it, but once you do, you'll be able to set up your print/print preview in a matter of minutes from now on. I recommend the second. Good luck!
-
Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha
If you're looking to print the RTF correctly (WYSIWYG), see HOW TO: Print the Content of a RichTextBox Control By Using Visual C# .NET[^] in the Microsoft Knowledge Base.
Microsoft MVP, Visual C# My Articles