"John Brown" <no_spam@_nospam.comwrote in message
news:ua**************@TK2MSFTNGP06.phx.gbl...
| >What kind of application is this? Windows forms or console like.
| >If Windows forms, do you pass the form object to the other thread?
| >
| Well, the worker thread's main function (entry point) is a member of a
| "Form" derivative and it passes a reference to the enclosing object
(form)
| to a function in another file and that's exactly where things start
| failing (as soon as the latter function is called). However, note that
all
| GUI processing is being routed back to the main GUI thread via
| "Control.Invoke()". In any case, is there a reason it should fail as
soon
| that function is called (perhaps you're alluding to some marshalling
issue
| I haven't considered - does the form's reference need to be marshalled
to
| the thread in some way). Thanks for your assistance (appreciated).
|
| By sheer coincidence I came across the following link while pursuing
another
| matter related to this problem (what luck!). I'm still tinkering but the
| "DebuggerDisplay" attribute seems to have solved the problem for the
moment.
| See the "System.Windows.Forms.Form and multithreading" section here:
|
|
http://blogs.msdn.com/greggm/archive...18/494648.aspx
|
|
Righht John, that's exactly what you are after, I hope one of the
work-arounds will help you out.
Willy.