You use Visual Studio .NET to create a Windows-based application. The application includes a form named XYZProcedures (EXP). EXP allows users to enter very lengthy text into a database. When users click the Print button located on EXP, this text must be printed by the default printer. You implement the printing functionality by using the native .NET System Class Libraries with all default settings. Users report that only the first page of the text is being printed. How should you correct this problem?

Correct Answer: In the PrintPage event, set the HasMorePages property of the PrintPageEventArgs object to True.

PrintDocument.PrintPage Event occurs when the output to print for the current page is needed. This event has the HasMorePages property which gets or sets a value indicating whether an additional page should be printed.