GroupBox Control in VB.Net
GroupBox is a container of other control. It displays a frame around a group of controls.
When you move the GroupBox control, all of its contained will also move.
How to use the GroupBox Control
Drag and drop GroupBox control from the toolbox on the window Form. When you drag and drop the group box, it has a border by default,
and its caption is set to the name of the control. You can change its caption.
GroupBox is a container of other control.
GroupBox properties
AutoSize: Gets or sets a value that indicates whether the GroupBox resizes based on its contents.
BackColor: Gets or sets the background color for the control.
ForeColor: Change ForeColor of all control inside GroupBox
You can change ForeColor of all control inside GroupBox at a time.
The code should be written inside Form Load so that when Form run than code (for changing ForeColor) will be executed.
For example:
Private Sub Form24_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Change Fore color of all control in side GroupBox
GroupBox1.ForeColor = Color.Blue
End Sub
Fore color of all control inside GroupBox will be change When Application run.
Leave Comment