How can I close a user generated button?
Here's the code for the button that creates new user generated buttons:
Public Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
TC = TC + 1
Dim TCP As New Integer
TCP = TC * 100
Dim NT As New MyButton
NT.Anchor = AnchorStyles.Top And AnchorStyles.Left
NT.Enabled = True
NT.Location = New Point(TCP, 85)
NT.Size = New Size(100, 30)
NT.Visible = True
Controls.Add(NT)
End Sub
MyButton is a custom button I had created.