|
-
Sep 18th, 2000, 05:56 AM
#1
Thread Starter
Registered User
Last edited by pir8eer; Oct 8th, 2005 at 08:24 AM.
-
Sep 18th, 2000, 08:25 AM
#2
Frenzied Member
You have to use a RichTextBox.
In code, use the RichTextBox's SelStart, SelLength, SelFont, etc. properties to change the color/fonts of ranges of text:
' make first 10 characters bold
RTF.SelStart = 0
RTF.SelLength = 10
RTF.SelBold = True
-
Sep 18th, 2000, 08:54 AM
#3
You could also use the microsoft internet control.
This would let people send each other embeded pictures and hyperlinks as well.
Just parse the data people send to make sure it is valid.
If someone sends you just a <b> then all your text in your chat window will go bold!!
I have used this and it words very well.
J.
-
Sep 18th, 2000, 11:49 AM
#4
Hyperactive Member
Hey Guys
I need some info on the same subject "RTB 's" .
Can I append text to the box and keep the formating ,like the color and font style or Do I have to read the whole RTF and reformat it ever time I add to it ?
Thankx
Private1
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Sep 18th, 2000, 11:51 AM
#5
You can either select text and then apply the format or you can directly modify the RTF code itself (this can end up getting very hardcore)
-
Sep 18th, 2000, 12:01 PM
#6
Hyperactive Member
I'm downloading a bunch of samples right now on RTB's .
What are your thoughts on this . I made a chat client and I want to impliment colores and fonts . Did this before .
Code:
Public Sub colorize()
Dim posEnd, posStart, x, i As Integer
x = 0
i = 0
For i = 0 To Len(RichTextBox1.Text)
RichTextBox1.SelStart = i
RichTextBox1.SelLength = 1
If RichTextBox1.SelText = ">" Then 'start tag
posStart = i
RichTextBox1.SelColor = vbRed
End If
Next i
End Sub
as you can imagine by the time there was a bunch written in the box that it flashed and scrolled alot . Where does one find the RTF codes to modify them ?
Thnks again ,
Private
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
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
|