Connecting Tech Pros Worldwide Forums | Help | Site Map

More threading newb questions

Mike P
Guest
 
Posts: n/a
#1: Mar 16 '07
On the same subject of having a progress window running to keep the user
updated on the progress of a running process, once the process is
finished how do you inform the user of the results of the process in the
original form? I am trying to do this and I get the error 'cross-thread
operation not valid, Label accessed from thread other than that it was
created on'



*** Sent via Developersdex http://www.developersdex.com ***

Marc Gravell
Guest
 
Posts: n/a
#2: Mar 16 '07

re: More threading newb questions


See my previous example and the BeginInvoke line which updates the
Text of the form. Exactly the same, but with myLabel.Text instead of
f.Text.

Marc


Mike P
Guest
 
Posts: n/a
#3: Mar 16 '07

re: More threading newb questions


I'm not sure where I would put this line in my code, I'm getting a bit
mixed up between different examples. Do you have a complete example of
a project in its simplest form where you are running a process on the
main form, and updating the user on another form?


*** Sent via Developersdex http://www.developersdex.com ***
Mike P
Guest
 
Posts: n/a
#4: Mar 16 '07

re: More threading newb questions


I managed to use the BeginInvoke line successfully, don't really know
what I'm doing there but it seems to work!

Could you help with other thread I have posted called Threading 2?


Many thanks,

Mike



*** Sent via Developersdex http://www.developersdex.com ***
Jon Skeet [C# MVP]
Guest
 
Posts: n/a
#5: Mar 16 '07

re: More threading newb questions


Mike P <mike.parr@gmail.comwrote:
Quote:
I managed to use the BeginInvoke line successfully, don't really know
what I'm doing there but it seems to work!
See http://pobox.com/~skeet/csharp/threads/winforms.shtml

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Closed Thread


Similar C# / C Sharp bytes