daveofgv
Well-known member
Hello -
Is there a way to call All settings at once?
Example:
If I have 100 check boxes on a form and they are all tied to My.Settings (boolean) and I need to have the following code, but want to condense it to a simple call instead:
etc....
Would I have to right all 100 or is there a way to call them all at once?
Thanks in advanced
daveofgv
Is there a way to call All settings at once?
Example:
If I have 100 check boxes on a form and they are all tied to My.Settings (boolean) and I need to have the following code, but want to condense it to a simple call instead:
VB.NET:
If My.Settings.Checkbox1 = True Then
label1.Visible = True
Else
label1.Visible = False
End If
If My.Settings.Checkbox2 = True Then
label2.Visible = True
Else
label2.Visible = False
End If
If My.Settings.Checkbox3 = True Then
label3.Visible = True
Else
label3.Visible = False
End If
If My.Settings.Checkbox4 = True Then
label4.Visible = True
Else
label4.Visible = False
End If
If My.Settings.Checkbox5 = True Then
label5.Visible = True
Else
label5.Visible = False
End If
If My.Settings.Checkbox6 = True Then
label6.Visible = True
Else
label6.Visible = False
End If
If My.Settings.Checkbox7 = True Then
label7.Visible = True
Else
label7.Visible = False
End If
If My.Settings.Checkbox8 = True Then
label8.Visible = True
Else
label8.Visible = False
End If
If My.Settings.Checkbox9 = True Then
label9.Visible = True
Else
label9.Visible = False
End If
If My.Settings.Checkbox10 = True Then
label10.Visible = True
Else
label10.Visible = False
End If
Would I have to right all 100 or is there a way to call them all at once?
Thanks in advanced
daveofgv