all spaces not underlined
the text in my richtextbox is always underlined but i want all the spaces not to be underlined.

now i already got a code for that:

    Dim returnedIndex As Integer = -1
        Dim startingIndex As Integer = 0
        Dim stopIndex As Integer
        Dim maxIndex As Integer = TextBox1.TextLength

        stopIndex = TextBox1.Find(" ", 0, maxIndex, RichTextBoxFinds.Reverse)

        While startingIndex <= stopIndex

            returnedIndex = TextBox1.Find(" ", startingIndex, maxIndex, RichTextBoxFinds.None)

            If returnedIndex >= 0 Then
                TextBox1.SelectionFont = lijn1

                startingIndex = returnedIndex + 1

                maxIndex = TextBox1.TextLength

                stopIndex = TextBox1.Find(" ", 0, maxIndex, RichTextBoxFinds.Reverse)
            Else

                Exit While
            End If

        End While

but if i got loads of text it takes a while before all the spaces are changed.

so... is there a way to do it faster??

( oh and textbox1 is a richtextbox)

all spaces not underlined
===

the text in my richtextbox is always underlined but i want all the spaces not to be underlined.

now i already got a code for that:

    Dim returnedIndex As Integer = -1
        Dim startingIndex As Integer = 0
        Dim stopIndex As Integer
        Dim maxIndex As Integer = TextBox1.TextLength

        stopIndex = TextBox1.Find(" ", 0, maxIndex, RichTextBoxFinds.Reverse)

        While startingIndex <= stopIndex

            returnedIndex = TextBox1.Find(" ", startingIndex, maxIndex, RichTextBoxFinds.None)

            If returnedIndex >= 0 Then
                TextBox1.SelectionFont = lijn1

                startingIndex = returnedIndex + 1

                maxIndex = TextBox1.TextLength

                stopIndex = TextBox1.Find(" ", 0, maxIndex, RichTextBoxFinds.Reverse)
            Else

                Exit While
            End If

        End While

but if i got loads of text it takes a while before all the spaces are changed.

so... is there a way to do it faster??

( oh and textbox1 is a richtextbox)
