Dim group Box1 As New Group Box() Dim button1 As New Button() button1. (Inherited from Control) Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.
Control Private Sub Initialize My Group Box() ' Create and initialize a Group Box and a Button control. Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.
If you click on these properties in Properties window, the Color Dialog pops up.
The complete Group Box itself cannot be selected or receive focus.
Summary A Group Box control is a container control used to group similar controls.
In this article, we discussed how to create a Group Box control in Windows Forms at design-time as well as run-time.
Dim group Box2 As New Group Box() Dim button2 As New Button() button2. Location = New Point(0, 120) ' Set the Flat Style of the Group Box. Note Only controls that are contained within the Group Box control can be selected or receive focus.
Add(group Box1) ' Create and initialize a Group Box and a Button control. You can add controls to the Group Box by using the Add method of the Controls property.