I don't think so. But, the whole thing can be shortened as:
For Each c As Control In Me.Controls
If TypeOf (c) Is Label Then
DirectCast(c, Label).ForeColor = Color.Coral
End If
Next
"matt" <no****@nobody.com> wrote in message
news:LL********************@comcast.com...
"Chris" <no@spam.com> wrote in message
news:ut**************@TK2MSFTNGP12.phx.gbl...
matt wrote: is it possible to change a setting, such as Forecolor for all text in a
form, or do you have to change it for each text block?
Find and replace.
Find ".ForeColor = "
Replace ".ForeColor = NewForeColor '"
hey, thanks for the reply. sorry for not being clear, i mean change it in
the code from its default settings in the form. for instance. i have 5 text
labels, lbl1...lbl5. all have default settings of black text, and i want to
change the text color to orange. i would do
lbl1.forecolor = colorsetting
lbl2.forecolor = colorsetting
....
lbl5.forecolor = colorsetting
is there an easy way to change a parmeter? like
new something = lbl1 ... lbl5
something.forecolor = colorsetting
Just a thought that i wanted to ask about. Thanks!