Try this,it will solve your problem:
For each and every active x control, it is needed to create it first, so that all the events and handles should be initialized.
So try this:
axMDocView1.CreateControl()
Pregunta
I am continuously struggling with this exception
An unhandled exception of type 'System.Windows.Forms.AxHost.InvalidActiveXStateException' occurred in AxInterop.SBXPCLib.dll
any help please, am i missing some thing.
Solución
Try this,it will solve your problem:
For each and every active x control, it is needed to create it first, so that all the events and handles should be initialized.
So try this:
axMDocView1.CreateControl()
Otros consejos
The answer by Vishal is Fulfill your requirement but here I wanted to add one more thing with it. If you wanted to reflected this changes via all the threads and not only by calling thread (in multiple thread scenario) then use
axMDocView1.CreateControl();
axMDocView1.SkinAllThreads();
Actually in multiple threading scenario if your skinning code is in one of the thread then may be it is not reflect change for other current thread so at that time this code is play important role in it.