I would go along these lines. A 5x5 grid sounds like a good use of a TableLyoutPanel. You'd place your 25 Labels in the cells of the table and then do something like this:VB Code:
Dim myRandom As New Random For Each lbl As Label in myTableLayoutPanel.Controls If myRandom.Next(0, 10) = 0 Then 'Kill the Label. lbl.Dispose() myTableLayoutPanel.Controls.Remove(lbl) End If Next lbl




Reply With Quote