Skip to content

Instantly share code, notes, and snippets.

@danielb7390
Created January 9, 2014 19:24
Show Gist options
  • Select an option

  • Save danielb7390/8340260 to your computer and use it in GitHub Desktop.

Select an option

Save danielb7390/8340260 to your computer and use it in GitHub Desktop.
Writes text to a RichTextBox with a color value (RGBA)
''' <summary>
''' Writes the text with the specified color to the RichTextBox
''' </summary>
''' <param name="tmp">The RichTextBox to use</param>
''' <param name="texto">The text to write to the RichTextBox</param>
''' <param name="R">Red</param>
''' <param name="G">Green</param>
''' <param name="B">Blue</param>
''' <param name="A">Alpha</param>
''' <remarks></remarks>
Private Sub writeTextRichBox(ByRef tmp As RichTextBox, ByVal texto As String, ByVal R As Integer, ByVal G As Integer, ByVal B As Integer, ByVal A As Integer)
tmp.Select(tmp.TextLength, 0)
tmp.SelectionColor = Color.FromArgb(A, R, G, B)
tmp.AppendText(texto)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment