Label5.Font = New Font(Label5.Font, And Not FontStyle.Bold) ![]() keeps the current Font Styles Or FontStyle.Bold add a new style property of Boldīelow codes will work if and only while the checkbox ‘Bold’ is unchecked Or FontStyle.Bold This is the main code. Label5.Font = New Font means the Lable5.Font is assinged a set of properties of New Font. The codes will work if and only while the checkbox ‘Bold’ is checked Here we take the codes for Bold property: Label5.Font = New Font(Label5.Font, And Not FontStyle.Strikeout) Label5.Font = New Font(Label5.Font, Or FontStyle.Strikeout) Label5.Font = New Font(Label5.Font, And Not FontStyle.Underline)Īnd the codes for ‘ Strikeout ’ ’ are: Private Sub Strikeout_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles strikeout.CheckedChanged Label5.Font = New Font(Label5.Font, Or FontStyle.Underline) Label5.Font = New Font(Label5.Font, And Not FontStyle.Italic)Ĭode for ‘ Underline’ should be like below: Private Sub Underline_CheckedChanged (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles underline.CheckedChanged Label5.Font = New Font(Label5.Font, Or FontStyle.Italic) ![]() Like this code for ‘ Italic’ should be like this: Private Sub Italic_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles italic.CheckedChanged
0 Comments
Leave a Reply. |