I am using VS 2012. Can anyone give a simple example, why do I need control.Invoke / BeginInvoke when using other thread. I tried to change text on a textbox via other thread, but everything just work fine. I know that in such cases the change must be called from the gui thread. But i can not find example when something doesn't work from the thread also. thank you. Liron
for example: I have this code, but it's just works fine:
private void button1_Click(object sender, EventArgs e)
{
Thread t = new Thread(new ThreadStart(ChangeText));
t.Start();
}
private void ChangeText()
{
for (int i = 0; i < 50; ++i)
{
textBox1.Text += "a";
Thread.Sleep(100);
}
}