void startlistening() { port.DataReceived.BeginInvoke += new SerialDataReceivedEventHandler (port_DataReceived); } void port_DataReceived() { label.Text = port.ReadExisting(); }
private void SetLabelText(Label l, string s) { if (InvokeRequired) { Invoke(new MethodInvoker(delegate { SetLabelText(l, s); })); } else { l.Text = s; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)