0

I was running a vb.net application and I got an exception like below. I think some com library named AxMSForms.dll is missing. From where would i get that? Any idea?

EXCEPTION Type = System.Runtime.InteropServices.COMException Message = Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Source = System.Windows.Forms Stack Trace Follows ------------------- at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at MyApp.frmWireSpacingData.InitializeComponent() at MyApp.frmWireSpacingData..ctor(measurement theMeasurement, cableProduct theProduct, IGraphPaneManager theGraphPaneManager, String printerName, String theTitle) at MyApp.frmCableSpec.doMeasurement() at MyApp.frmCableSpec.cmdMeasure_Click(Object sender, EventArgs e)

  • It looks like you have an ActiveX control on your WinForm that is not registered on the machine you're running the app on. – jmcilhinney Aug 10 '18 at 10:59
  • @jmcilhinney How to get that registered? I found that Activex component is *Interop.MSForms (Microsoft Forms 2.0 Object Library)*. How could I register that? I have a dll of that library. Wil that help? – Muhammed Thabjeel Aug 10 '18 at 11:12
  • Why are you using that in the first place? Do you need it? I'm not 100% sure what it is but I have a feeling it is something that was designed to help migrate applications from VB6 to VB.NET in stages. If that's the case then it's something that you should be trying to eliminate ASAP. – jmcilhinney Aug 10 '18 at 11:48
  • @jmcilhinney Yeah. It's an old application. Is there any alternative for this one? – Muhammed Thabjeel Aug 10 '18 at 11:53
  • 1
    I think that [this](https://www.microsoft.com/en-us/download/details.aspx?id=14913) is what I was thinking of but the description seems to suggest that it's for .NET in VB6 rather than the other way around. If this is what you're using then you may need to install it on the target machine. – jmcilhinney Aug 10 '18 at 12:35
  • 2
    Possible duplicate of [Can't find Microsoft Forms 2.0 Object Library or FM20.DLL](https://stackoverflow.com/questions/35664768/cant-find-microsoft-forms-2-0-object-library-or-fm20-dll) – Lex Li Aug 10 '18 at 12:52
  • You should look at the `MyApp.frmWireSpacingData.InitializeComponent` method to determine what ActiveX control(s) is(are) being created that depend on the Microsoft Forms 2.0 Object Library. If this library is being directly used in the application (not a dependency of another library), you should be able to find a native .Net control to replace the ActiveX control. – TnTinMn Aug 10 '18 at 13:52
  • @LexLi That post helped me to solve the problem using Activex control pad. Is there any to provide those AxMSForms dll's as a part of my application? – Muhammed Thabjeel Aug 13 '18 at 04:35

0 Answers0