In a GroupBox other controls may be placed. When designing user interfaces in Windows Forms, you can use this control to create a square shape where you can place other controls. This creates an important level of visual continuity. It helps makes your programs easier to use.

This Windows Forms article covers the GroupBox control and its properties.
To begin, you need to add the GroupBox control to your Windows Forms application. You can do this by opening the Toolbox and double-clicking the GroupBox icon, or dragging the icon to your window. The next thing you should do is resize, or preferably dock, the GroupBox; then you can add more controls inside the GroupBox by dragging.

For most user interfaces in Windows Forms, using the docking or anchoring options for controls is ideal. These options allow you to tie the size of the control to the size of an enclosing control or the window itself. This means you can have fluidly resizing windows that always look great. Giving users the ability to resize windows is important if some of them use different font sizes or have poor vision. To dock the GroupBox, please select Properties on the GroupBox in the Visual Studio designer. Then, scroll to Dock, and click one of the six buttons.
Top
Bottom
Left
Right
These will push the control to the selected edge.
Center
This will expand the control to fill the entire window.
Shown in the GroupBox in this tutorial.
None
The default; will disable docking.

Every control in Windows Forms has many options for changing visual effects and also the text shown. For the GroupBox, you will want to change the Text property. In the screenshot, the Text property was changed to "Dot Net Perls," which is the name of a website I have heard of. Dock is also an important property; please see the above notes on docking.

It is also possible to add event handlers to execute code when events occur in the GroupBox. Honestly, I haven't found much use on events on the GroupBox, but perhaps in some cases this is useful. Typically, when designing user interfaces, it is a good idea to create abstractions that can be reused and that don't rely on a specific user interface toolkit for logic.
The GroupBox control is not one of the most exciting controls in the Windows Forms platform, but is certainly a useful one. It can help you organize a clean and usable interface for your program, and is particularly helpful on options or preferences windows and dialogs.
Windows Forms