I'm having some problems with this exception as well. I have an AxMapControl provided by the vendor, and I am extending the control. When adding the control to the Controls collection of a UserControl where I want to display it using the toolbox, it works just fine. However, when adding the control programatically, I get the exception mentioned in this thread. InitializeComponent for my derived class is already executed when trying to set a property on the ActiveX. The same code that worked when running after adding the control from the toolbox, fails now.
I've tried to do everything the designer does, with no luck. I've even copied the content of the OcxState from the resource file and set it to the OcxState of my control, with no luck.
I understand why the exception occurs based on the help in the msdn documentation, but I don't know how to work around it.
Any ideas?