|
-
July 6th, 2001, 04:13 PM
#1
search for..............
This isn't the same as before. I am making a debugger, and i need to know: When the user clicks a button it searches. If it finds the text it's looking for, it highlights it and scrolls to where the text is. How do i do that?
--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: [email protected]
for the address
-
July 7th, 2001, 09:42 AM
#2
Re: search for..............
What are you searching? A text file,a DataBase, a textBox a RichTextBox, a ComboBox, a Listbox or what?
John G
-
July 7th, 2001, 10:28 AM
#3
Re: search for..............
A richtextbox
--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: [email protected]
for the address
-
July 8th, 2001, 09:05 AM
#4
Re: search for..............
To search a RichTextBox, use its .Find method. There is an option on the .Find that will highlight the found text.
MSDN Help discusses the various options. Search on "Find Method" (Without the quotes of course) to locate it.
John G
-
July 9th, 2001, 07:11 AM
#5
Re: search for..............
Try this code dude!!
Dim pos As Integer
Dim target As String
target = "xyz" 'What ever string you are searching for
pos = InStr(0, RichText1.Text, target)
If pos > 0 Then
RichText1.SelStart = pos - 1
RichText1.SelLength = Len(target)
RichText1.SelColor = vbRed
RichText1.SelBold = True
End If
.... so lemme know if it works dude!!!
AnkewDude!
There is no Genius without a touch of madness!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|