how to add a new button during run time in a group box?

nebchill26

Member
Joined
Oct 8, 2008
Messages
7
Location
San Mateo, Rizal, Philippines
Programming Experience
1-3
hi can anyone help me on how i can add a new button in a groupbox?

i already have a code on how to add a new button during run time but i cant seem to put it inside a group box... here's my code

VB.NET:
        ''Create the button
        'Dim btn As New Button()
        ''Specify the location and the size
        'btn.Location = New System.Drawing.Point(200, 30)
        'btn.Size = New System.Drawing.Size(100, 20)
        'btn.Text = "New Button"
        ''Add it to the forms control collection
        'Me.Controls.Add(btn)
        ''Link the event to the event handler
        'AddHandler btn.Click, AddressOf Me.btnAddDtl_Click

and if possible if i have added a few buttons there will be a scrollbar in the group box?or maybe i should just put it in a frame where a scrollbar is accessible..
 
Back
Top