|
-
Sep 5th, 2007, 09:43 AM
#1
Thread Starter
Addicted Member
RichTextBox: PrintView and Printing
Dear All,
I want to implement printview and printing in my application(it is using RichTextBox.) Can you please guide.
-
Sep 5th, 2007, 11:18 AM
#2
Thread Starter
Addicted Member
Re: RichTextBox: PrintView and Printing
Well... I searched for this and got the idea that I should use PrintDialog and PrintDocument controls. I was also able to get some piece of code from web:
printDialog1.Document = printDocument1;
if (this.printDialog1.ShowDialog() == DialogResult.OK)
{
this.printDocument1.DocumentName = this.txtEditor.Text;
this.printDocument1.Print();
}
Problem:
I am not sure what should I use in place of "this.txtEditor.Text". Currently it prints a blank page. I also tried to use the name of RichTextBox control "txtEditor", but same result.
Can anyone guide in this regard?
-
Sep 14th, 2007, 07:17 AM
#3
Re: RichTextBox: PrintView and Printing
I ain't to sure if your issue has been resolved but here is a link showing the easy way to printing and print previewing in C# 
Code Project - Simple Printing
-
Sep 15th, 2007, 02:36 AM
#4
Re: RichTextBox: PrintView and Printing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|