You can just loop through all the controls of type label.
This should do the trick.
'For each control in the form
For Each ctrl As Control In Me.Controls
'If its of type label
If TypeOf ctrl Is Label Then
'Change the color
ctrl.ForeColor = Color.Black
End If
Next
Edited like Vincent suggested so we don't need to declare ctr before.
As Bugs suggested here is an even shorter option:
For Each ctr In Me.Controls.OfType(Of Label)
ctr.ForeColor = Color.Black
Next
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…