|
-
Nov 23rd, 1999, 10:41 AM
#2
Member
Here's an algorithm:
Function GetRedString(rtf as RichTextBox) As String
dim i as long,ret as string
rtf.sellength = 1
for i = 1 to len(rtf.text)
rtf.selstart = i
if rtf.selcolor = vbRed then ret = ret & rtf.seltext
next i
GetRedString = ret
End Function
I just wrote that off the top of my head, so im not 100% sure it works, give it a whirl. Basically it checks the RGB value of each character in the textbox against the selected color, if they match it adds the character to a string, and returns it.
------------------
-Mystiq
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
|