I have a loop where I want to add a button every time the loop iterates...
I have this above my while:
Dim mybut As New Button
Dim btn_number As Integer = 0
I have this within my while:
btn_number += 1
mybut.AutoSize = True
mybut.Name = "delete-btn" & btn_number
mybut.Location = New System.Drawing.Point(77, 112)
mybut.Text = "Delete"
With mybut.Controls
.Add(mybut)
End With
But I get an error message... It's on danish, so I have a little trouble translating it to english, I'm sorry.... But it's something about an object that is referring to itself in a loop...
Hope some of you can spot the issue.... It's possible that I'm writing this all wrong... Thanks.