Private Delegate Sub UpdateDelegate(ByVal LogData As String)
Private Sub UpdateTextBox(ByVal LogData As String)
If Me.InvokeRequired() Then
Me.Invoke(New UpdateDelegate(AddressOf UpdateTextBox), New Object() {LogData})
Else
Dim Stamp As String = Now.ToString("yyyy-MM-dd, HH:mm:ss")
TextBox1.AppendText(vbCrLf & "[" & Stamp & "] " & LogData)
End If
End Sub
|