I create many buttons in code like :
And I want delete some buttons crete when I click on my button, but i don't how i can do, because these buttons are create in code??
VB.NET:
Public Sub GenereTextBox(ByVal rep As String)
Dim txt As New TextBox
Dim fnt As Font
fnt = Me.Font
txt.Location = New Drawing.Point(26 + NbreCacher * (68), txtOrdonnee)
txt.Font = New Font(fnt.Name, 40, FontStyle.Regular)
txt.Size = New Size(130, 37)
txt.Multiline = True
txt.Name = "textb" + Str((NbreEssai - 1) * 4)
Me.Controls.Add(txt)
txt.Text = rep
txtOrdonnee = txtOrdonnee + 40
txt.ReadOnly = True
End Sub
And I want delete some buttons crete when I click on my button, but i don't how i can do, because these buttons are create in code??