المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Form data printing problem



C# Programming
04-02-2010, 08:31 PM
I created a UserControl that contains three RichTextBox controls. I added a PrintDocument property, and the methods required to print (Print, PrintPage, BeginPrint, etc).

I have a loop that iterates the data and loads three strings in the RichTextBox controls, one to each control, and then calls PrintDocument.Print(). It should then print that page and get the next three strings of data to print.

This works fine for the first page, but the other pages don't print. After calling PrintDocument.Print() the program returns to the main form that called the UserControl print method.

How do I continue iterating through my loop to print more pages?