Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Windows.Forms.AxHost.InvalidActiveXStateException was unhandled

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.

like image 797
Nisar Avatar asked Mar 29 '14 05:03

Nisar


1 Answers

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()

like image 70
Vishal I P Avatar answered Oct 12 '22 00:10

Vishal I P