Private Sub ReceivedText(ByVal [text] As String) 'compares the ID of the creating Thread to the ID of the calling Thread Dim PLCdata(20) As Integer If Me.rtbReceived.InvokeRequired Then Dim x As New SetTextCallback(AddressOf ReceivedText) Me.Invoke(x, New Object() {(text)}) Call StrToHex(text) Else Me.rtbReceived.Text = sHex ' For Me.I = 1 To 15 'PLCdata(I) = ASC(Mid$(text, I, 1)) 'Next End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)