ActiveX interop & aximp.exe tool.
A wrapper has to be created for an ActiveX control before it can be used. This can be done manually by declaring C# classes with the appropriate attributes. The easy way is to use aximp.exe, when it works.
aximp.exe can be used manually, in which case you add references to the generated Foo.dll and AxFoo.dll manually, or automatically, by customizing the toolbox with a reference to the control and then dragging it onto a form. In this case the dll’s are named AxInterop.SHDocVw.dll and Interop.SHDocVw.dll.
If you only add a reference to the COM control to the project’s references folder, things don’t seem to work.
Comments
Thank you for posting this. It saved my day.
Jason
Posted by: Jason | July 22, 2005 04:38 PM