Practice Questions

Question 1You are printing the first page of a two-page document and want to fire the PrintPage event for the second page. How can you do this with the least amount of effort?
  • A. Set the HasMorePages property to false.

  • B. Set the HasMorePages property to true.

  • C. Perform a simple loop, instantiating the PagePrint method for each page in order.

  • D. Place two PrintDocument components within the application, and link each to the appropriate page.

A1: Answer B is correct. By setting the HasMorePages property to true, the PrintDocument component will generate the next page's output. Answer A is incorrect because setting the HasMorePages property to false would tell the component there are no more pages to print. Answers C and D are ...

Get Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.