richTextBox 颜色控制

    Private Sub output(ByVal str As String, ByVal color As Color)
        '默认色 SystemColors.WindowText,灰色 Color.Gray,红色 Color.Red,绿色 Color.Green,橘红 Color.OrangeRed
        richTextBox.SelectionColor = color
        richTextBox.AppendText(str & vbCrLf)
        richTextBox.ScrollToCaret()
    End Sub

 

posted @ 2013-11-28 16:21  addressok  阅读(279)  评论(0)    收藏  举报