Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-add-a-toolstripcontainer-to-a-form.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.6 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Add a ToolStripContainer to a Form 03/30/2017
csharp
vb
toolbars [Windows Forms], built-in rafting
ToolStrip control [Windows Forms], built-in rafting
ToolStripContainer control [Windows Forms], adding to Windows Forms
d0f55095-a833-453e-be5a-644906d75d54

How to: Add a ToolStripContainer to a Form

You can programmatically add a xref:System.Windows.Forms.ToolStripContainer to a Windows Form and populate it with controls.

Example

The following code example demonstrates how to add a xref:System.Windows.Forms.ToolStripContainer and a xref:System.Windows.Forms.ToolStrip to a Windows Forms, how to add items to the xref:System.Windows.Forms.ToolStrip, and how to add the xref:System.Windows.Forms.ToolStrip to the xref:System.Windows.Forms.ToolStripContainer.TopToolStripPanel%2A of the xref:System.Windows.Forms.ToolStripContainer.

[!code-csharpSystem.Windows.Forms.ToolStripContainer2#1] [!code-vbSystem.Windows.Forms.ToolStripContainer2#1]

Compiling the Code

This code example requires:

  • References to the System.Drawing, System.Text, and System.Windows.Forms assemblies.

See also