--- title: "How to: Use a Control Rendering Class" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" - "cpp" helpviewer_keywords: - "professional appearance [Windows Forms], rendering Windows Forms controls" - "visual themes [Windows Forms], applying to Windows Forms controls" - "visual styles [Windows Forms], rendering Windows Forms controls" ms.assetid: c0125e34-cd74-4c35-818c-3e40f462b0a3 --- # How to: Use a Control Rendering Class This example demonstrates how to use the class to render the drop-down arrow of a combo box control. The example consists of the method of a simple custom control. The property is used to determine whether visual styles are enabled in the client area of application windows. If visual styles are active, then the method will render the drop-down arrow with visual styles; otherwise, the method will render the drop-down arrow in the classic Windows style. ## Example [!code-cpp[System.Windows.Forms_ControlRenderer#10](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms_ControlRenderer/cpp/form1.cpp#10)] [!code-csharp[System.Windows.Forms_ControlRenderer#10](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms_ControlRenderer/CS/form1.cs#10)] [!code-vb[System.Windows.Forms_ControlRenderer#10](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms_ControlRenderer/VB/form1.vb#10)] ## Compiling the Code This example requires: - A custom control derived from the class. - A that hosts the custom control. - References to the , , , and namespaces. ## See also - [Rendering Controls with Visual Styles](rendering-controls-with-visual-styles.md)