I have a main form (frmMain).
frmMain creates a sub form (frmSub).
frmSub creates a business object (busObj).
busObj creates a thread and calls a method to run in the thread.
The method creates a server side buiness object (busObjSrv).
busObjSrv creates an Excel.Application (exAp) object on the server.
exAp opens an automated excel woekbook (exWb) (automated by an outside
company)
busObjSrv fills the information from frmSub on exWb and calls the automation
methods.
The automation methods generate 2 word documents based on the information
from frmSub, and data from the other company located on the work book.
Sorry for the long explenation, but heres the problem...
once busObj spins the thread off, frmSub closes and breaks the object link
between busObj and frmMain. If an exception is thrown in busObjSrv, I cannot
pass it back to frmMain to display to the user through the catch blocks. A
general exception gets thrown (break/continue) and the program does not blow
up, but the exception is not being handled properly (IMO).
Does anyone know a way that I can pass the exception back to frmMain to
display in a MessageBox?
We have several business objects that use threading, and I would like to
incorporate a solution into a utility object that we can use for all
threading.
If I figure it out first... I will post the solution in case someone else
needs it.
Thanks in advance.
bobc