which must prevent other control from modifying the rendering behavior of your control?

You are busy creating an extended control deriving class from Button. What should you do to render your control with an oval shape which must prevent other control from modifying the rendering behavior of your control?

You are busy creating an extended control deriving class from Button. What should you do to render your control with an oval shape which must prevent other control from modifying the rendering behavior of your control?

A.
You should override the OnPaint method and call the base implementation and render the control.

B.
You should override the OnPaintBackground method and render the control but not call the base implementation.

C.
You should override the OnPaint method and render the control but not call the base implementation.

D.
You should override the OnPaintBackground method and call the base implementation and render the control.

Explanation:
The UserPaint method is used whenever regions of a control are invalidated. The base OnPaint method raise the Paint event.

Incorrect Answers:
A: You should not call the OnPaint method. This would raise the OnPaint method. B, D: You should not override the OnPaintBackground method.



Leave a Reply 0

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