That is some pretty old code and due to security issues with the .net 1.1 framework, microsoft no longer allows threads to communicate with the form controls. You will need to replace the code with something like this:
delegate void SetOnActiveHomeRecv(object strAction, object Address, object Command, object Reserved1, object Reserved2, object Reserved3, object Reserved4);
private void OnActiveHomeRecv(object strAction, object Address, object Command, object Reserved1, object Reserved2, object Reserved3, object Reserved4)
{
if (this.StatusTextBox.InvokeRequired) {
SetOnActiveHomeRecv d = new SetOnActiveHomeRecv(OnActiveHomeRecv);
this.Invoke(d, new object[] { strAction, Address, Command, Reserved1, Reserved2, Reserved3, Reserved4 });
return;
}
String strMsg = "";
if (((String)strAction).ToUpper() == "RECVPLC")
strMsg += "Recieved Powerline Command:";
strMsg += " " + Address.ToString().ToUpper();
strMsg += " " + Command.ToString().ToUpper();
if (Reserved1.ToString().Length > 0)
strMsg += " " + Reserved1.ToString().ToUpper();
if (Reserved2.ToString().Length > 0)
strMsg += " " + Reserved2.ToString().ToUpper();
if (Reserved3.ToString().Length > 0)
strMsg += " " + Reserved3.ToString().ToUpper();
if (Reserved3 != null && Reserved3.ToString().Length > 0)
strMsg += " " + Reserved3.ToString().ToUpper();
StatusTextBox.AppendText(strMsg + "\r\n");
}