I'm using C# and I'm making an application where a lot of UI loading must be done in background. Is it possible to do it unsafely and ignore InvalidOperationExceptions? The only way I found it to put try...catch statements around every single line of code but this will take ages as there is too much code.
+2
A:
Updating UI directly from threads is a bad thing. If you have multiple threads trying to update, then you are in trouble, If you are sure that only that thread is going to update the UI,
use this before invoking the thread
CheckForIllegalCrossThreadCalls =False
Sr7
2010-03-21 04:23:51
that's what I needed
Nick Brooks
2010-03-21 04:30:39
@Srin at least you warned him... :)
Lirik
2010-03-21 06:53:02