turn test containing multiple fonts to bold

Joined
Jun 18, 2009
Messages
5
Programming Experience
Beginner
I hav used the following text to turn text bold. but it doesnt work when i select text with multiple fonts

VB.NET:
Dim doc As frmDocument = Me.ActiveMdiChild
        On Error Resume Next
        If doc.Text1.Focused Then
            If doc.Text1.SelectionLength > 0 Then
                doc.Text1.SelectionFont = New System.Drawing.Font(doc.Text1.SelectionFont, doc.Text1.SelectionFont.Style Xor FontStyle.Italic)
            End If
        End IF

Text1 is rtb on child form.
 
Back
Top