What should you do to ensure that exactly four pages are printed?

You are creating a Windows Form that includes custom print functionality. You need to ensure that exactly four pages are printed. What should you do?

You are creating a Windows Form that includes custom print functionality. You need to ensure that exactly four pages are printed. What should you do?

A.
In the BeginPrint event handler, reset a counter.
Increment the counter each time that the PrintPage event handler is invoked.
On the fourth invocation, set the PrintPageEventArg.HasMorePages property to False.

B.
In the BeginPrint event handler, reset a counter.
Increment the counter each time that the PrintPage event handler is invoked.
On the fourth invocation, set the PrintPageEventArg.Cancel property to True.

C.
In the PrintPage event handler, ensure that the page will render only if the PrintPageEventArg.HasMorePages property is set to True.

D.
In the PrintPage event handler, ensure that the page will render only if the PrintPageEventArg.Cancel property is set to False.



Leave a Reply 0

Your email address will not be published. Required fields are marked *