Hi all i have a thread that is able to read data being received across from bluetooth stream. On the sender part i made it a while loop where count keeps on increasing + 1. I did a messagebox.show(test); and it works fine but when i do a label.text = test i get :
"Control.Invoke must be used to interact with controls created on a separate thread." error. My follow code in C# :
Thread t = new Thread(new ThreadStart(readStream)); t.Start(); public void readStream() { while (true) { String test = manager.Reader.ReadLine(); label1.Text = test; } }
My question is , how do i update the label in a thread? Any simple ways with control invoke?