[2005] Cycle through controls.
I have 80 panels 16x16 that look like this:
http://www.rattlesoft.com/table.png
I'm trying to cylce through each panel, so if I put my mouse over the panel on row 1 column 10, it will run:
pl_?x1.SetMouseOver(True)
My idea was to do it like this:
Code:
For i As Integer = 1 To 10
pl_?x1.SetMouseOver(True)
Next
Where ? = i
The issue is I can't seem to put i into the name.
Re: [2005] Cycle through controls.
You should be using a TableLayoutPanel with a Panel in each cell. You can then use a nested loop to visit each cell of the TLP and call GetControlFromPosition to get the Panels.