Sub LogMessage(From As String, Msg As String)
Dim RSB As RichStringBuilder
Dim RS As RichString
RSB.Initialize
RS.Initialize( Msg & CRLF)
If Msg.Contains("AT") Then
RS.color(Colors.Red,0,RS.Length)
else If Msg.Contains("SO vor H/V") Then
RS.Color(Colors.Yellow,0,RS.Length)
else If Msg.Contains("GA vor H/V") Then
RS.Color(Colors.Yellow,0,RS.Length)
else If Msg.Contains("SO nach H/V") Then
RS.Color(Colors.Green,0,RS.Length)
else If Msg.Contains("GA nach H/V") Then
RS.Color(Colors.Green,0,RS.Length)
End If
RSB.Append(RS)
txtLog.Text = RSB
txtLog.SelectionStart = txtLog.Text.Length
End Sub