Dim _button() As Button Dim _x As Integer = 20 Dim _y() As Integer = {0, 50, 100, 150, 200, 250, 300, 350, 400, 450} For i As Integer = 1 To 10 ReDim _button(i) With _button(i) .Visible = 1 .Text = i .Size = New Size(20, 50) .Location = New Point(_x, _y(i - 1)) Controls.Add(_button(i)) End With Next
Dim _button() As Button Dim _x As Integer = 20 Dim _y() As Integer = {0, 50, 100, 150, 200, 250, 300, 350, 400, 450} For i As Integer = 1 To 10 _button = New Button ' and so long
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)