Displaying Labels Created at Runtime
PrivateSub btnGo_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles btnGo.Click
Dim iAsInteger
Dim jAsInteger
Dim cells(8, 8)As Label
For i = 0To 8
For j = 0To 8
cells(i, j) =New Label
cells(i, j).Width = 40
cells(i, j).Height = 40
cells(i, j).Text =CStr(i * 9 + j + 1)
cells(i, j).Top = 70 + i * 10
cells(i, j).Left = 70 + j * 20
cells(i, j).ForeColor = Color.Blue
cells(i, j).BorderStyle = BorderStyle.FixedSingle
cells(i, j).Visible =True
cells(i, j).TextAlign = ContentAlignment.MiddleCenter
cells(i, j).AutoSize =False
Next
Next
EndSub

