Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
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.
User-Drawn Controls Describes where to put your drawing code, and visual behavior like button clicks, default buttons, and focus rectangles.
Providing Appearance Using Constituent Controls Outlines the use of the Resize event, including the handling of minimum control size.
For More Information Control creation models are discussed in "Control Creation Basics," earlier in this chapter.