void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
if (!InvokeRequired)
if (e.EventType == SerialData.Chars)
string portData = serialPort1.ReadExisting();
textBox2.AppendText(portData);
}
else
SerialDataReceivedEventHandler invoker = new SerialDataReceivedEventHandler(serialPort1_DataReceived);
BeginInvoke(invoker, new object[] { sender, e });
Attachment: commsample.zip