GroupBox (control group) controls typically exist as containers for groups of other controls, which facilitates user identification and makes the interface more user-friendly (the GroupBox control is equivalent to a previous version of Visual Basic Frame control). You can use control group controls to further categorize the various features in a form, such as separating the various option button controls. In most cases, there is no actual action on the control Group control. We use it to group controls, and there is usually no need to respond to its events. However, its properties such as name, text, and font may be modified frequently to suit the requirements of the application at different stages. The icon for the GroupBox control in the toolbox is as shown in the figure:
1. Add a GroupBox control to the form
When you use a control group control to group other controls, you first draw the control group control and then draw other controls inside it, and the other controls are the container for the control group control, so that when you move the group of controls, you can move the controls that it contains.
2. Control controls within the control group
To add controls to the control group control, you simply draw them inside the control group control. If you draw a control outside of a control group control, or when you add a control to a form using the double-click Method, and then move it inside the control group control, the control will also be subordinate to the control Group control. This is also where the GroupBox in vb.net differs from the previous version of the frame.
3. Selecting multiple controls in box plus
To select multiple controls in the frame, you need to press the CTRL key when you click on the control group control, and the controls within the frame are selected when the mouse is released.