如何在richTextBox最后一行,加一条蓝色的一行文字,然后再把这行删掉(点按钮才删),注意只是richTextBox最后一行,在线,解决即结贴

解决方案 »

  1.   


    Private Const cstrTemp As String = "wahaha"Private Sub Command3_Click()
        RichTextBox1.Text = Mid(RichTextBox1.Text, 1, Len(RichTextBox1.Text) - Len(cstrTemp) - 1)
    End SubPrivate Sub Form_Load()    With RichTextBox1
            .Text = RichTextBox1.Text & vbCrLf & cstrTemp
            .SelStart = Len(RichTextBox1.Text) - Len(cstrTemp)
            .SelLength = Len(cstrTemp)
            .SelColor = vbBlue
        End With
    End Sub
      

  2.   

    http://www.cnpopsoft.com/article.asp?id=18