G
Guest
I want to create a non-UI class that has a long running worker thread in it.
The worker thread periodically raises progress events or a done event that is
sent to the Main/UI thread.
Is there a way to raise events from the class that will be run on the
Main/UI thread?
I don't want to use callbacks to the UI thread, just a class that raises
events.
The problem I am having is how to get at the ISychronizeInvoke interface
from a class.
The only kludge around I could come up with is to pass in delegates to the
constructor and then Invoke them. Not very user friendly because they have
to have the correct signatures.
The worker thread periodically raises progress events or a done event that is
sent to the Main/UI thread.
Is there a way to raise events from the class that will be run on the
Main/UI thread?
I don't want to use callbacks to the UI thread, just a class that raises
events.
The problem I am having is how to get at the ISychronizeInvoke interface
from a class.
The only kludge around I could come up with is to pass in delegates to the
constructor and then Invoke them. Not very user friendly because they have
to have the correct signatures.