The follwing is the code that is used for adding a label and checkbox to a panel that is created.
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e_ As System.EventArgs) Handles MyBase.Load Dim Panel1 As New Panel() Dim CheckBox1 As New CheckBox() Dim Label1 As New Label() Panel1.Location = New Point(30, 60) Panel1.Size = New Size(200, 264) Panel1.BorderStyle = BorderStyle.Fixed3D 'setting the borderstyle of the panel Me.Controls.Add(Panel1) CheckBox1.Size = New Size(95, 45) CheckBox1.Location = New Point(20, 30) CheckBox1.Text = "Checkbox1" Label1.Size = New Size(100, 50) Label1.Location = New Point(20, 40) Label1.Text = "CheckMe" Panel1.Controls.Add(CheckBox1) Panel1.Controls.Add(Label1) 'adding the label and checkbox to the panel End Sub
|
No responses found. Be the first to respond and make money from revenue sharing program.
|