Page 1 of 1

ActiveX outside of the form context

Posted: Thu Sep 15, 2011 8:27 am
by iunknown
Hi, the layer in our software is a business layer and has no access to a window or form. It also runs on separate threads (and should work from any thread) that are not STA.
:shock: I cannot make the ActiveX to start working in this manner, only when it resides within a form.
:idea: I've made a call to f_in_box__control1.CreateControl() directly after ActiveX object's constructor, but it still cannot work.
:?: What do you suggest?

Posted: Thu Sep 15, 2011 12:27 pm
by iunknown
Ok,
I made it work by creating dedicated thread as STA,
custom ApplicationContext (to provide my own custom context) which in turn creates, initializes the f_in_box control and plays flash content, along with the Application.Run(context) method to get the message pump started.
Any thoughts on this?

Posted: Thu Sep 15, 2011 2:47 pm
by Softanics
Hello,

Yes, looks like a correct way. You needed a message cycle and you got it.

Thank you.