Re: Monitoring Threads

Vince P <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <011701c771d0$60e1b750$22a525f0$@net>
Reference any member that is a type of Control and is on the UI thread, and
call BeginInvoke with a delegate. That will marshal to the UI thread.


-
THESE are the times that try men's souls. The summer soldier and the
sunshine patriot will, in this crisis, shrink from the service of their
country; but he that stands by it now, deserves the love and thanks of man
and woman. Tyranny, like hell, is not easily conquered; yet we have this
consolation with us, that the harder the conflict, the more glorious the
triumph.


> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to build apps
> and controls [mailto:[email protected]] On Behalf Of
> Kelly Baker
> Sent: Wednesday, March 28, 2007 19:37
> To: [email protected]
> Subject: [DOTNET-WINFORMS] Monitoring Threads
>
> I am still working on that dll that runs a process in a different
> thread,
> then raises a NewData event for the calling executable.  I have redone
> it
> using the BackgroundWorker class to do my threading.  I have a
> System.Timers.Timer object that runs the RunWorkerAsync method.  In the
> RunWorkerCompleted event I raise the NewData event.  But the executable
> still raises the cross-threading error when I try to update the form
> controls.  Is there a way to programmatically get the thread ID that is
> displayed on the Threads debug window?  I would like to log what thread
> is
> active with each operation until I can find where my problem is.
>
> Thanks,
> Kelly
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.