What I have is 2 classes.
Class1 and Class2
Class1 is declared on a form using:
Class2 is declared in exactly the same way, but inside class1. So basically Class2 raises events into class1, then depending on these events class1 raises further events to the UI.VB Code:
Private Withevents Woof As Class1
Now I ALWAYS want class1 in the same thread as the form.
It's class2 that executes code async.
So, I want to "marshal", invoke, or whatever it's called, so that class2 raises the event into class1 in the correct thread? make sense?
All the examples I have seen involve using a form, or in your example, a control to work out what thread the event needs to be invoked 2.
Am I making sense?
Sorry if my terminology is incorrect.
Woka




Reply With Quote