title: Moving controls on a form onto a tab
body: <p>I have been working for months on a project in c# in Visual Studio 2010 (it interfaces with a camera, power supplies, and motion control). There is a form with many controls on it (radio buttons, buttons, text boxes, bitmap displays...). Now I would like to put all of that on a tab so i can have another tab. This is so that the second tab can have all the default settings on it (e.g, portnumber, baud rate, integration times, pathname...).</p>
  
  <p>Is this doable? Is there a way to cut and paste or click and drag?</p>
  
  <p>Update:
  I created a form, put a button on it that when clicked displays a message box with "Hello World". Then i added a tab control to the form, and dragged the button onto the first tab. The button still functions in the same way, displaying the message box when clicked. </p>
  
  <p>So on my big form, i added a tabcontrol. Without resizing it, i did a select all, then unselected the tabcontrol, then dragged everything onto the tab. I then moved the tab control and resized it, then iteratively resized the tab window and moved all the controls. this worked, except the picturebox controls somehow got resized so they were larger than a screen width. Resized the pictureboxes and everything works. (perhaps i just needed the encouragement to give it a try...sorry if not the best question:).</p>
  
  <p>To do this in code, in Form1.Designer.cs can add:</p>
  
  <pre class="lang-cs prettyprint-override"><code> this.tabPage1.Controls.Add(this.button1);
  </code></pre>
  
  <p>However, I would have to do this for every single control (about 200 of them in Designer.cs).</p>