I have a chat application I made in VB . The main window is a richtextbox . I want to add color to the "Nick" the person is using and I tried this
The Probem with that is that evertime something new is put in the box it scrolls through the whole RTB contents and it looks ugly . How do they do it in Mirc ? Should I write all the chat strings to a file and reload it evertime something new is entered ? Any ideas would be great ! Thanks again .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




Reply With Quote