Dan,
What you would have to do is wrap your thread code in an exception
handler. Once you do that, you will have to send a message to the main
thread (a Windows message) with the exception information. You can do this
by using the GCHandle structure. With it you can allocate a handle to an
object (the exception) and then pass it through a call to SendMessage
(through the P/Invoke layer). Then, in your main form, you can process the
message (assuming you send using a custom message type, usuall WM_USER +
some number) getting the object back through the static methods on the
GCHandle structure.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
ni**************@exisconsulting.com
"Dan Cimpoiesu" <da**********@gmx.net> wrote in message
news:uI****************@tk2msftngp13.phx.gbl...
How can I make to route the exceptions from a thread created by my
Application, different that the Applications thread to the application.
I want that when a exception occures in that thread, the application to be
aware of it and to display that default dialog for exceptions.
Regards
Dan Cimpoiesu