I don't know what your chat program looks like but here's an example for you to try out.
Start a new standard EXE application. Add a RichTextBox to the form. Put an ordinary TextBox under it and add a command button.
You type a line of text in the ordinary TextBox and hit the CommandButton. The text you have typed is then added to the RTF-box.
Put the following code in the Click event of the CommandButton:
Play around with it for a while.Code:Private Sub Command1_Click() Randomize With RichTextBox1 .SelStart = Len(.Text) .SelColor = QBColor(Int(Rnd * 16)) .SelText = Text1.Text & vbCrLf Text1 = "" Text1.SetFocus End With End Sub
Good luck!




Reply With Quote