Actually yes. I am quite a newbie to Windows Forms and C#.
Thanks for the answer.
"Joerg Jooss" <jo*********@gmx.net> wrote in message
news:ut**************@TK2MSFTNGP10.phx.gbl...
"Vadym Stetsyak" spoke:
Hello!
I've got a class, representing Windows Form (Form1);
When I launch new thread user interface e.g. Form1 stops responding
until the worker thread is completed.
So the question - how this can be avoided. Roughly speaking I need to
perform some job after the button click and while this job is
completing user GUI can respond.
Here is the code I'm using:
ThreadStart threadStart = new ThreadStart(DoSomething);
Thread thread = new Thread (threadStart);
thread.Start();
In the debuger thread.Start() returns immediately. But GUI freezes
until the work thread is completed.
Does "DoSomething" try to access UI components? That is *not* allowed.
For a general introduction into the whole topic, check out
http://msdn.microsoft.com/msdnmag/is...ing/default.as
px
Cheers,
--
Joerg Jooss
jo*********@gmx.net