G
Guest
I like the concept and features of the BackgroundWorker. However, I observed
that it will only work for clients that implement ISynchronizeInvoke (namely
forms and controls). My instinct is that BeginInvoke uses windows message
loops to synchronize back to the main (UI) thread.
I want this same capability in a business level component so that it can
fire client delegates on the main (UI) thread if it did some asynchronous
work on a background thread, but I don't want to have to force it to carry
around a full 'System.Windows.Forms' form so that I can kludge the
BeginInvoke methods.
Is there a ligthweight WindowImpl that I can programmatically use to post
messages to and handle the callback in a WndProc on the main UI? In ATL I
would create a simple CWindow and host it without a resource file for it or a
visible window. I could receive messages from it and use it to perform
worker thread synch.
Is there anythign comparable in .NET? Or must I carry around the weight of
a complete System.Windows.Form?
Thanks,
that it will only work for clients that implement ISynchronizeInvoke (namely
forms and controls). My instinct is that BeginInvoke uses windows message
loops to synchronize back to the main (UI) thread.
I want this same capability in a business level component so that it can
fire client delegates on the main (UI) thread if it did some asynchronous
work on a background thread, but I don't want to have to force it to carry
around a full 'System.Windows.Forms' form so that I can kludge the
BeginInvoke methods.
Is there a ligthweight WindowImpl that I can programmatically use to post
messages to and handle the callback in a WndProc on the main UI? In ATL I
would create a simple CWindow and host it without a resource file for it or a
visible window. I could receive messages from it and use it to perform
worker thread synch.
Is there anythign comparable in .NET? Or must I carry around the weight of
a complete System.Windows.Form?
Thanks,