i'm writing a program for WinCE6 in C# , using Network (TCP/IP) and Serialport. i used a thread for socket listening and as data received i want to show it in a label on form. but there is an error for accessing controls in Threads and i wanted to solve it with and Invoke - BeginInvoke command but didn't work. Neither BackgroundWorker!
if (txtTCPRecieve.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
txtTCPRecieve.Invoke(d);
}
delegate void SetTextCallback();
void SetText()
{
label3.Text = stringData;
}
is there any one can help?
tnx