Results 1 to 2 of 2

Thread: Resume previous index during a search

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2015
    Posts
    114

    Resume previous index during a search

    Hi,

    am trying to resume previous index during a search for matches from a file from the code below, incase an application loses Internet Connection. How do you achieve this in .NET?

    Code:
    Wordintext = Wordrepcemnts.Keys.ElementAt(WordintextIndex)
    
     foundWordintextIndex = RichTextBox1.Find(Wordintext, 0, RichTextBox1.Text.Length, RichTextBoxFinds.WholeWord)
        If foundWordintextIndex > -1 Then
    
    For Each Wordforrep In Wordrepcemnts(Wordintext)
                     
    'do something here
    
    
                    Next

  2. #2
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Resume previous index during a search

    Find returns the index. Then you can use an overload of Find that includes the starting index.
    But since you have the text in a RTB, how losing internet connection affect it?
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width