CodePudding user response:
Color new_color=Color. FromArgb (new Random (Environment. TickCount.) Next ());
GroupBox1. Controls. CastToList () (). The ForEach (c=& gt; C.F oreColor=new_color);
GroupBox1. ForeColor=new_color;
CodePudding user response:
Using a recursive set of controls ForeColor