Private Sub add_log(txt As String, upper As Boolean, withcrlf As Boolean)
logcnt = logcnt + 1
If upper Then txt = txt.ToUpperCase
If withcrlf = True Then
ta1.Text = ta1.Text & txt & CRLF
Else
ta1.Text = ta1.Text & txt
End If
Sleep(100)
ta1.ScrollTopPosition = logcnt * 30
End Sub