I am using the richtextbox selectionstart and selectionLength property for finding some text but its not working .
can anybody help me please ....

here is my code

Dim startPos As Integer
        Dim endPos As Integer
        RichTextBox8.Rtf = RichTextBox8.Rtf
        startPos = InStr(RichTextBox8.Rtf, "\objw") 
        endPos = InStr(RichTextBox8.Rtf, "\objh") 

        Dim startP As Integer = startPos
        Dim endp As Integer = endPos
        Dim totallen As Integer = endp - startP

        RichTextBox8.SelectionStart = startP
        RichTextBox8.SelectionLength = totallen


        TextBox11.Text = RichTextBox8.SelectedText
        RichTextBox9.Rtf = RichTextBox8.SelectedRtf

I am also use the richtextbox.Find () method but its not working.

Edited by __avd: Added [code] tags. Do wrap your programming code blocks within [code] ... [/code] tags

7 Years
Discussion Span
Last Post by bhagawatshinde

Problem solved by finding the richtextbox data using find method use rtf data into textbox as rtf then use find() method.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.