COPYING CONTROLS
A particularly useful technique for building a series of similar controls is to build one and then use copy and paste to make others.
For example, to build the name, street, city, state, and ZIP code TextBoxes described in the previous section, you could start by adding the name TextBox to the form. Next, set all of the properties that you want the control copies to share. For example, you may want to adjust the TextBox’s width, set its MaxLength property to 20, and set its Anchor property to Top, Left, Right so it resizes horizontally when its container resizes. Now select the control on the designer and press Ctrl+C to copy it. Then press Ctrl+V repeatedly to make copies for the other controls. Drag the controls into position and you have quickly built all of the controls with their shared properties already set.
You can also use copy and ...
Get Visual Basic 2012 Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.