Hi Armin,
Of course the operating system supports it, the control itself can
handle calls from another thread, that's simple enough to do. I've just
come across a property of one control called...
CheckForIllegal CrossThreadCall s
The problem I have with invoking is that with the current architechture
of my control if I were to simply use this as necessary it would cause the
host thread to perform the tasks that the worker thread was designed to do.
I haven't had any problems as yet with this control being manipulated from
another thread. Indeed if this is the shape of things to come then I should
create a new control anyway, which I have just started, but it's still time.
Anyway, I'm going to carry on, and check this property out too to see if
it's in the control im trying to re-write. Thanks for your help!
nick.
"Armin Zingler" <az*******@free net.de> wrote in message
news:e%******** ********@tk2msf tngp13.phx.gbl. ..
"NickP" <a@a.com> schrieb Hi there,
This might sound like a stupid question but this whole exception
being thrown when accessing user controls from another thread is
extremely over the top!
Just looking at the index property of a listviewitem from another
thread throws an exception! Is there any way to allow these as
invoking the host thread to do the work is going to really slow
things down unless I change the architechture completely. Wouldn't
it have made sense to have an option to make the control invoke
itself rather than raising an exception?? Maybe I'm missing the
point
I understand that there may be consequences, but surely cant we
decide that ourselves??
No, because it's not supported by the OS. Where's the problem if you have
to use BeginInvoke to have the UI thread do something?
Armin