J
Julie
So, I have an ActiveX control inside of a Windows Form class.
Apparently, the ActiveX control is not thread safe. So, I'm attempting
to change my code such that only one thread uses the control.
I have a thread that creates the Form with the following line:
Application.Run(new FormClass()); // ActiveX control inside of
FormClass
I had the notion that if I were to create an event in this same thread
to handle all calls to the ActiveX control, then I could fire that
event with other threads, but have this one thread handle all of the
incoming events. The way I implemented the events, however, it appears
that a single thread is not receiving all of the events.
Rather, the thread that fired the event is the one that receives the
event.
How can I implement events such that only one thread receives them? Or
am I going about this all wrong and do you have a better idea?
Thank you!
Apparently, the ActiveX control is not thread safe. So, I'm attempting
to change my code such that only one thread uses the control.
I have a thread that creates the Form with the following line:
Application.Run(new FormClass()); // ActiveX control inside of
FormClass
I had the notion that if I were to create an event in this same thread
to handle all calls to the ActiveX control, then I could fire that
event with other threads, but have this one thread handle all of the
incoming events. The way I implemented the events, however, it appears
that a single thread is not receiving all of the events.
Rather, the thread that fired the event is the one that receives the
event.
How can I implement events such that only one thread receives them? Or
am I going about this all wrong and do you have a better idea?
Thank you!