vbMarkO Posted September 20, 2005 Posted September 20, 2005 Ok, subject line couldnt put all what I am needing or trying to do... The Find method with the RTB is to slow...... What would be a faster way of searching for a Phrase (which is the string entered in TextBox by user) then once the string is located I would like it to change its color to Red Then I would like the line the string is in to come to the top of the RTB NOTE: I dont want to clear the RTB just would like the scroll position to move so that the line containing the search string is located at the top of the RTB or near the top. Hope I dont confuse things by adding this but just another note should there be 2 or more occurances of the string entered that the first occurance be what is placed at the top then with a 2nd button click perhaps in a Find Next button it would move to the next occurance and so on vbMarkO Quote Visual Basic 2008 Express Edition!
Nate Bross Posted September 26, 2005 Posted September 26, 2005 I only know of the instr function or the .SubString method of the string type. Unless you write your own, which would probably not be much faster anyway. Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
Leaders snarfblam Posted September 26, 2005 Leaders Posted September 26, 2005 How about regular expressions? I don't know if it will be faster, but it's worth a shot. Quote [sIGPIC]e[/sIGPIC]
vbMarkO Posted September 28, 2005 Author Posted September 28, 2005 hmmm Marble regular expressions might be worth a try but then, what are regular expresions? :) they sound sort of scarry!! vbMarkO Quote Visual Basic 2008 Express Edition!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.