Lesson Review

The following questions are intended to reinforce key information presented in this lesson. The questions are also available on the companion CD if you prefer to review them in electronic form.

NOTE Answers

Answers to these questions and explanations of why each choice is right or wrong are located in the "Answers" section at the end of the book.

1. Which of the following are true of the Graphics class? (Choose all that apply.)

A. The Graphics class encapsulates Pens and Brushes that can be used to render graphics.

B. The Graphics class represents a drawing surface, such as one exposed by a form or control.

C. The Graphics class provides a variety of methods that can be used to render line shapes and filled shapes.

D. You can obtain a reference to an instance of the Graphics class by calling Control.CreateGraphics or from an instance of PaintEventArgs in the OnPaint method.

2. Which of the following are characteristics of custom controls? (Choose all that apply.)

A. Custom controls must provide their own rendering code.

B. Custom controls can incorporate other Windows Forms components.

C. Custom controls provide a default visual interface around which the rendering code is built.

D. Custom controls inherit from the UserControl class.

Was this article helpful?

0 0

Post a comment