-
Hi Guys,
I have a form with 240 shape objects.
It is a control panel simulation.
So we have shape1.backcolor = rgb(0,0,0)
until shape240.backcolor = rgb(0,0,0)
Isn't there a shorter way to code instead of typing
240 lines.
Think about something as a loop.
Tried a few things but seems not to work.
Thanks for your time
Ray
-
Look into "collections"
Code:
For Each c In Me.Controls
If TypeOf c Is TextBox Then
c.BackColor = frm_Main.SkinForm1.SkinSource.ClrWindow
c.ForeColor = frm_Main.SkinForm1.SkinSource.ClrWindowText
End If
Next
[]P
-
To Private1
Thanks for the code
Works fine.
Cheers
Ray