Assigning multiple properties to a Font
I have some code in which I allow the user to control the different
attributes of controls on a form, i.e. Italics, Bold, BackColor,
ForeColor.
My problem is that when the user selects Italics & Bold, I'm not sure what
the format is to do this. Here is what I have so far.
For Each ctl As Control In frm.Controls
If TypeOf (ctl) Is Button Then
ctl.Font = New Font(ctl.Font, FontStyle.Italic)
End If
Next
This is the effect I want:
ctl.Font = New Font(ctl.Font, FontStyle.Italic, FontStyle.Bold)
No comments:
Post a Comment