* 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
1.8 KiB
title, ms.date, helpviewer_keywords, ms.assetid, author, ms.author, manager
| title | ms.date | helpviewer_keywords | ms.assetid | author | ms.author | manager | |||
|---|---|---|---|---|---|---|---|---|---|
| How to: Reassign Existing Controls to a Different Parent | 03/30/2017 |
|
5a5723ff-34e0-4b6f-a57b-be4ebe35cb34 | jillre | jillfra | jillfra |
How to: Reassign existing controls to a different parent
You can assign controls that exist on your form to a new container control.
-
In Visual Studio, drag three xref:System.Windows.Forms.Button controls from the Toolbox onto the form. Position them near to each other, but leave them unaligned.
-
In the Toolbox, click the xref:System.Windows.Forms.FlowLayoutPanel control icon. (Do not drag the icon onto the form.)
-
Move the mouse pointer close to the three xref:System.Windows.Forms.Button controls.
The pointer changes to a crosshair with the xref:System.Windows.Forms.FlowLayoutPanel control icon attached.
-
Click and hold the mouse button.
-
Drag the mouse pointer to draw the outline of the xref:System.Windows.Forms.FlowLayoutPanel control.
-
Draw the outline around the three xref:System.Windows.Forms.Button controls.
-
Release the mouse button.
The three xref:System.Windows.Forms.Button controls are now inserted into the xref:System.Windows.Forms.FlowLayoutPanel control.