Created
January 9, 2014 19:24
-
-
Save danielb7390/8340260 to your computer and use it in GitHub Desktop.
Writes text to a RichTextBox with a color value (RGBA)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' <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