Share via


Visual Basic Concepts

Drawing Your Control

The way you draw your control's appearance depends on the control creation model you're using.

If you're creating a user-drawn control, you have to do all the drawing yourself. You have to know when to draw your control, what state it's in (for example, clicked or unclicked), and whether you should draw a focus rectangle.

If you're enhancing an existing control or creating a control assembly, on the other hand, your UserControl's constituent controls provide your control's appearance. The constituent controls draw themselves automatically, and all you have to worry about is whether they're positioned correctly on the UserControl.

The following topics outline the basic techniques required for each model.

For More Information   Control creation models are discussed in "Control Creation Basics," earlier in this chapter.