--- title: "How to: Add a Control to a ToolStripContentPanel" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "ToolStripContentPanel [Windows Forms], adding controls" ms.assetid: fa410960-bf1a-42fc-80e8-f2e27fb3dbb8 --- # How to: Add a Control to a ToolStripContentPanel You can programmatically add one or more controls to a . ## Example The following code example demonstrates how to add a to a . [!code-csharp[System.Windows.Forms.ToolStripContainer#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.ToolStripContainer/CS/Form1.cs#1)] [!code-vb[System.Windows.Forms.ToolStripContainer#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.ToolStripContainer/VB/Form1.vb#1)] ## Compiling the Code This code example requires: - References to the System, System.Data and System.Windows.Forms assemblies. ## See also - - - [ToolStripContainer Control](toolstripcontainer-control.md) - [ToolStrip Control](toolstrip-control-windows-forms.md)