• Log in or sign up for an account here: https://www.sythe.org/login

RTB Writeln Function

Terrankiller

Ex-Administrator

Retired Administrator
Visual Basic Programmers
Joined
May 7, 2005
Sythe Gold
1
Messages
1,286
Location
California
RTB Writeln Function
I am currently developing an open source IRC server and I am using a Rich Text Box control as a console to display data. This function will append the specified rtb using the specified text, font, font size, color, and style.

Code:
Public Sub Writeln(ByRef RTB As RichTextBox, ByVal sText As String, ByVal sFont As String, ByVal fSize As Integer, ByVal fColor As Color, ByVal fStyle As FontStyle)

   RTB.SelectionColor = fColor
   RTB.SelectionFont = New Font(sFont, fSize, fStyle)
   RTB.AppendText(sText & vbNewLine)

End Sub

An example use:

Code:
Writeln(RichTextBox1, "Hello World!", "Verdana", 8, Color.Red, 1)
Writeln(RichTextBox1, "This", "Verdana", 8, Color.Blue, 2)
Writeln(RichTextBox1, "is", "Verdana", 8, Color.Green, 3)
Writeln(RichTextBox1, "a", "Verdana", 8, Color.Orange, 4)
Writeln(RichTextBox1, "test!", "Verdana", 8, Color.Yellow, 5)

Picture of the example:

6hu6ig.png
 
RTB Writeln Function
Pretty smooth ;)
Are you making a whole server or just a client?

And if you need a hand here and there just send a message my way or post here and i'll help. I don't mind a little project here and there to sharpen my dwindling skills :)
 
RTB Writeln Function
I'd be very interested to see the finished product. Really good idea with the Writeln function too. Keep it up.
 
RTB Writeln Function
I am developing a server and client. I am trying to figure out the best way to go about programming both using the .net socket library.
 
Runescape Gamblingrunescape gambling
Back
Top