Valhalla Legends Archive

Programming => General Programming => Topic started by: UserLoser on December 27, 2002, 06:46 AM

Title: RichtTextBox Help
Post by: UserLoser on December 27, 2002, 06:46 AM
How can i make my RTB remove the top line(or text) when it gets filled with messages.  So when a new message comes in, it removes the top line of the RTB, this way i wont need a scroll bar on it, and wont really need a clear chat..
Title: Re: RichtTextBox Help
Post by: Grok on December 27, 2002, 07:04 AM
I'm thinking this should do it.

   Dim lPos As Long
    With rtb
        lPos = InStr(.Text, vbCrLf)
        If lPos Then
            .Text = Mid(.Text, lPos + 2)
        End If
    End With

Hope this helps.
Grok
Title: Re: RichtTextBox Help
Post by: UserLoser on December 27, 2002, 07:17 AM
Alright thanks, ill give it a test run  ;)
Title: Re: RichtTextBox Help
Post by: Etheran on December 27, 2002, 02:05 PM
Grok, you're evil :P