Xkape
Member
Hello everyone,
I am working on a small project with font controls, and it has 3 checkbox controls Bold, Italic, and Underline. With a textbox at the bottom of the form, with a word.
When you check the Bold the text goes bold, etc
Question?
How do you make all three work at the same time?
Like this Sample text
Here is some of the code
If CheckBoxBold.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 1)
ElseIf CheckBoxItalic.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 3)
ElseIf CheckBoxUnderline.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 7)
Else
txtSample.Font = New System.Drawing.Font(txtSample().Font, 0)
End If
Is there something that goes into the formload event?
Thanks for the help,
J
I am working on a small project with font controls, and it has 3 checkbox controls Bold, Italic, and Underline. With a textbox at the bottom of the form, with a word.
When you check the Bold the text goes bold, etc
Question?
How do you make all three work at the same time?
Like this Sample text
Here is some of the code
If CheckBoxBold.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 1)
ElseIf CheckBoxItalic.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 3)
ElseIf CheckBoxUnderline.Checked = True Then
txtSample.Font = New System.Drawing.Font(txtSample().Font, 7)
Else
txtSample.Font = New System.Drawing.Font(txtSample().Font, 0)
End If
Is there something that goes into the formload event?
Thanks for the help,
J