B
batvanio
Hi,
Does anyone know if there is a better solution for the good old
"Cross-thread operation not valid" than dealing with delegates and
Invokes? (This happens when you access GUI from a thread that did not
create it)
I realize that the problem is based on the old Windows requirement
(only thread that created the window shalt process its messages) but it
is 21 century and the new VS 2005 was supposed to be all about
productivity, concentrate on your buisness logic and do not write
plumbing code etc... If poluting your code with delegates and Invokes
just to do (txtBox1.Text = "Blah") is not plumbing I am not sure what
is....
Anyway, does anyone know if a better, more straightforward solution
exist? I guess the anonimous methods help a bit but it is still pretty
ugly. I also read about the BackgroudWorker component but that one is
not very intuitive either...
Ivan
Does anyone know if there is a better solution for the good old
"Cross-thread operation not valid" than dealing with delegates and
Invokes? (This happens when you access GUI from a thread that did not
create it)
I realize that the problem is based on the old Windows requirement
(only thread that created the window shalt process its messages) but it
is 21 century and the new VS 2005 was supposed to be all about
productivity, concentrate on your buisness logic and do not write
plumbing code etc... If poluting your code with delegates and Invokes
just to do (txtBox1.Text = "Blah") is not plumbing I am not sure what
is....
Anyway, does anyone know if a better, more straightforward solution
exist? I guess the anonimous methods help a bit but it is still pretty
ugly. I also read about the BackgroudWorker component but that one is
not very intuitive either...
Ivan