Hi,
I have used following code in our VB .Net Project Visual Studio 2017. Dll ".Forms.AxFrame.dll" added in Referance.
Public WithEvents Frame5 As AxMicrosoft.Vbe.Interop.Forms.AxFrame
----------
Me.Frame5 = New AxMicrosoft.Vbe.Interop.Forms.AxFrame()
----------
CType(Me.Frame5, System.ComponentModel.ISupportInitialize).BeginInit()
----------
''Frame5
Me.Frame5.Location = New System.Drawing.Point(168, 64)
Me.Frame5.Name = "Frame5"
Me.Frame5.OcxState = CType(resources.GetObject("Frame5.OcxState"), System.Windows.Forms.AxHost.State)
Me.Frame5.Size = New System.Drawing.Size(30, 5)
Me.Frame5.TabIndex = 33
----------
Me.Controls.Add(Me.Frame5)
----------
CType(Me.Frame5, System.ComponentModel.ISupportInitialize).EndInit()
----------
When I am trying to debug above code it is showing following Error:
System.Runtime.InteropServices.COMException
HResult=0x80040154
Message=Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Source=System.Windows.Forms
StackTrace:
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.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
System.InvalidOperationException
HResult=0x80131509
Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Source=eEditor
StackTrace:
at eEditorDLA.My.MyProject.MyForms.Create__Instance__[T](T Instance) in :line 190
at eEditorDLA.My.MyProject.MyForms.get_frmMain()
at eEditorDLA.frmMain.Main()
Inner Exception 1:
COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))