rhawk
asked on
Problems moving VB.NET 2008 application source to new computer
We had a consultant convert an old VB6 application to VB.NET 2008 last year. The machine the work was done on and that we compile on is getting long in the tooth and I have a new machine I am replacing it with. I have taken care to install XP SP3 on the new machine, which is what is on the old one. I then installed VS 2008 and put the source in the exact same location on the new machine (directory wise) as on the old one. When I first opened the solution on the new computer I saw that one reference had a yellow “!” warning. It was System.Web.Extensions. I corrected this by changing it’s setting from specific version =true to false, assuming the VS 2008 on the older machine was not at the latest update. Changing that setting removed the yellow “!” warning.
There is still at least one more problem. When compiling it fails with errors. The section of code that fails is:
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
m_vb6FormDefInstance = Me
End If
'This call is required by the Windows Form Designer.
InitializeComponent()
'Forms = New FormsCollection
Forms.Add(Me) 'upgrade_maryz
End Sub
And the offending line is the InitializeComponents().
The exception details are:
System.Runtime.InteropServ ices.COMEx ception was unhandled
ErrorCode=-2147221164
Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="System.Windows.For ms"
StackTrace:
at System.Windows.Forms.Unsaf eNativeMet hods.CoCre ateInstanc e(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHos t.CreateWi thoutLicen se(Guid clsid)
at System.Windows.Forms.AxHos t.CreateWi thLicense( String license, Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stanceCore (Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stance()
at System.Windows.Forms.AxHos t.GetOcxCr eate()
at System.Windows.Forms.AxHos t.Transiti onUpTo(Int 32 state)
at System.Windows.Forms.AxHos t.CreateHa ndle()
at System.Windows.Forms.Contr ol.CreateC ontrol(Boo lean fIgnoreVisible)
at System.Windows.Forms.Contr ol.CreateC ontrol(Boo lean fIgnoreVisible)
at System.Windows.Forms.AxHos t.EndInit( )
at dotNetUtility.frmMDIMain.I nitializeC omponent() in C:\Documents and Settings\cw7007\VBNET_Publ ish\dotNet Utility_So urce\frmMa in.vb:line 624
at dotNetUtility.frmMDIMain.. ctor() in C:\Documents and Settings\cw7007\VBNET_Publ ish\dotNet Utility_So urce\frmMa in.vb:line 19
at dotNetUtility.ModuleMain.M ain() in C:\Documents and Settings\cw7007\VBNET_Publ ish\dotNet Utility_So urce\Modul eMain.vb:l ine 18
at System.AppDomain._nExecute Assembly(A ssembly assembly, String[] args)
at System.AppDomain.nExecuteA ssembly(As sembly assembly, String[] args)
at System.Runtime.Hosting.Man ifestRunne r.Run(Bool ean checkAptModel)
at System.Runtime.Hosting.Man ifestRunne r.ExecuteA sAssembly( )
at System.Runtime.Hosting.App licationAc tivator.Cr eateInstan ce(Activat ionContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.App licationAc tivator.Cr eateInstan ce(Activat ionContext activationContext)
at System.Activator.CreateIns tance(Acti vationCont ext activationContext)
at Microsoft.VisualStudio.Hos tingProces s.HostProc .RunUsersA ssemblyDeb ugInZone()
at System.Threading.ThreadHel per.Thread Start_Cont ext(Object state)
at System.Threading.Execution Context.Ru n(Executio nContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHel per.Thread Start()
InnerException:
Also when I try to do to the mainform design it shows me this:
To prevent possible data loss before loading the designer, the following errors must be resolved:
1 Error
Ignore and Continue
Why am I seeing this page?
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Instances of this error (2)
1. Hide Call Stack
at System.Windows.Forms.Unsaf eNativeMet hods.CoCre ateInstanc e(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHos t.CreateWi thoutLicen se(Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stanceCore (Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stance()
at System.Windows.Forms.AxHos t.GetOcxCr eate()
at System.Windows.Forms.AxHos t.set_Site (ISite value)
at System.ComponentModel.Cont ainer.Add( IComponent component, String name)
at System.ComponentModel.Desi gn.Designe rHost.Add( IComponent component, String name)
at System.ComponentModel.Desi gn.Designe rHost.Syst em.Compone ntModel.De sign.IDesi gnerHost.C reateCompo nent(Type componentType, String name)
at System.ComponentModel.Desi gn.Seriali zation.Des ignerSeria lizationMa nager.Crea teInstance (Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Desi gn.Seriali zation.Des ignerSeria lizationMa nager.Syst em.Compone ntModel.De sign.Seria lization.I DesignerSe rializatio nManager.C reateInsta nce(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Desi gn.Seriali zation.Cod eDomSerial izerBase.D eserialize Instance(I DesignerSe rializatio nManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Desi gn.Seriali zation.Com ponentCode DomSeriali zer.Deseri alizeInsta nce(IDesig nerSeriali zationMana ger manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Desi gn.Seriali zation.Cod eDomSerial izerBase.D eserialize Expression (IDesigner Serializat ionManager manager, String name, CodeExpression expression)
at System.ComponentModel.Desi gn.Seriali zation.Cod eDomSerial izer.Deser ializeStat ementToIns tance(IDes ignerSeria lizationMa nager manager, CodeStatement statement)
at System.ComponentModel.Desi gn.Seriali zation.Cod eDomSerial izer.Deser ialize(IDe signerSeri alizationM anager manager, Object codeObject)
at System.Windows.Forms.Desig n.ControlC odeDomSeri alizer.Des erialize(I DesignerSe rializatio nManager manager, Object codeObject)
at System.ComponentModel.Desi gn.Seriali zation.Typ eCodeDomSe rializer.D eserialize Name(IDesi gnerSerial izationMan ager manager, String name, CodeStatementCollection statements)
2. Hide Call Stack
at System.Windows.Forms.Unsaf eNativeMet hods.CoCre ateInstanc e(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHos t.CreateWi thoutLicen se(Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stanceCore (Guid clsid)
at System.Windows.Forms.AxHos t.CreateIn stance()
at System.Windows.Forms.AxHos t.GetOcxCr eate()
at System.Windows.Forms.AxHos t.Transiti onUpTo(Int 32 state)
at System.Windows.Forms.AxHos t.CreateHa ndle()
at System.Windows.Forms.Contr ol.CreateC ontrol(Boo lean fIgnoreVisible)
at System.Windows.Forms.Contr ol.CreateC ontrol()
at System.Windows.Forms.Contr ol.Control Collection .Add(Contr ol value)
at System.Windows.Forms.Form. ControlCol lection.Ad d(Control value)
at System.Windows.Forms.Desig n.ControlD esigner.De signerCont rolCollect ion.Add(Co ntrol c)
I really need to get this application to compile on this machine and I am not overly familiar with VS.NET.
There is still at least one more problem. When compiling it fails with errors. The section of code that fails is:
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
m_vb6FormDefInstance = Me
End If
'This call is required by the Windows Form Designer.
InitializeComponent()
'Forms = New FormsCollection
Forms.Add(Me) 'upgrade_maryz
End Sub
And the offending line is the InitializeComponents().
The exception details are:
System.Runtime.InteropServ
ErrorCode=-2147221164
Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="System.Windows.For
StackTrace:
at System.Windows.Forms.Unsaf
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.AxHos
at dotNetUtility.frmMDIMain.I
at dotNetUtility.frmMDIMain..
at dotNetUtility.ModuleMain.M
at System.AppDomain._nExecute
at System.AppDomain.nExecuteA
at System.Runtime.Hosting.Man
at System.Runtime.Hosting.Man
at System.Runtime.Hosting.App
at System.Runtime.Hosting.App
at System.Activator.CreateIns
at Microsoft.VisualStudio.Hos
at System.Threading.ThreadHel
at System.Threading.Execution
at System.Threading.ThreadHel
InnerException:
Also when I try to do to the mainform design it shows me this:
To prevent possible data loss before loading the designer, the following errors must be resolved:
1 Error
Ignore and Continue
Why am I seeing this page?
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Instances of this error (2)
1. Hide Call Stack
at System.Windows.Forms.Unsaf
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.ComponentModel.Cont
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.ComponentModel.Desi
at System.Windows.Forms.Desig
at System.ComponentModel.Desi
2. Hide Call Stack
at System.Windows.Forms.Unsaf
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.AxHos
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.Contr
at System.Windows.Forms.Form.
at System.Windows.Forms.Desig
I really need to get this application to compile on this machine and I am not overly familiar with VS.NET.
Are you using Office Interop assemblies or any other COM components?
You are still using a non-.Net component (surely a COM component coming from VB6). You need to find it, register it properly and reference it.
If your application is not a web app, propably that System.Web.Extensions can be simply removed from the references.
If your application is not a web app, propably that System.Web.Extensions can be simply removed from the references.
ASKER
CodeCruiser,
I do see Interop.Microsoft.Office.C ore and Interop.Outlook. I also know they are needed as the application s communicates to Outlook and Word.
How do I know which references are com?
emoreau,
I am not sure if the app uses the web and I would rather play with removing references after it compiles again.
Both: In playing with this last week (as I said I am not a .net developer so take what I found with a grain of salt) it looked like interop.MSComDlg may have been on of the issues and the ComCntrls, but not sure.
Opening the project file in a text editor, here are the references it uses:
<ItemGroup>
<Reference Include="ADODB">
<Name>adodb</Name>
<HintPath>..\..\..\..\..\P rogram Files\Microsoft.NET\Primar y Interop Assemblies\adodb.dll</Hint Path>
<AssemblyFolderKey>hklm\pr imary interop assemblies</AssemblyFolder Key>
</Reference>
<Reference Include="AxInterop.MSComct lLib">
<Name>AxInterop.MSComctlLi b</Name>
<HintPath>bin\AxInterop.MS ComctlLib. dll</HintP ath>
</Reference>
<Reference Include="AxInterop.MSComDl g">
<Name>AxInterop.MSComDlg</ Name>
<HintPath>bin\AxInterop.MS ComDlg.dll </HintPath >
</Reference>
<Reference Include="CrystalDecisions. CrystalRep orts.Engin e, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304, processorArchitecture=MSIL ">
<Private>False</Private>
</Reference>
<Reference Include="CrystalDecisions. Enterprise .Framework , Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304" />
<Reference Include="CrystalDecisions. Enterprise .InfoStore , Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304" />
<Reference Include="CrystalDecisions. ReportSour ce, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304, processorArchitecture=MSIL " />
<Reference Include="CrystalDecisions. Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304, processorArchitecture=MSIL " />
<Reference Include="CrystalDecisions. Windows.Fo rms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521 e1304">
<Private>False</Private>
</Reference>
<Reference Include="DataGridViewColum ns, Version=1.4.3.0, Culture=neutral, PublicKeyToken=26596b3a8d7 c8940, processorArchitecture=MSIL " />
<Reference Include="Interop.Excel">
<Name>Interop.Excel</Name>
<HintPath>..\UTILITY_upgra de20081002 \bin\Inter op.Excel.d ll</HintPa th>
</Reference>
<Reference Include="Interop.Microsoft .Office.Co re">
<Name>Interop.Microsoft.Of fice.Core< /Name>
<HintPath>..\Utility.NET\b in\Interop .Microsoft .Office.Co re.dll</Hi ntPath>
</Reference>
<Reference Include="Interop.MSAdodcLi b">
<Name>Interop.MSAdodcLib</ Name>
<HintPath>..\Utility.NET\b in\Interop .MSAdodcLi b.dll</Hin tPath>
</Reference>
<Reference Include="Interop.MSComDlg" >
<Name>Interop.MSComDlg</Na me>
<HintPath>bin\Interop.MSCo mDlg.dll</ HintPath>
</Reference>
<Reference Include="Interop.MSCommLib ">
<Name>Interop.MSCommLib</N ame>
<HintPath>..\Utility.NET\b in\Interop .MSCommLib .dll</Hint Path>
</Reference>
<Reference Include="Interop.Outlook">
<Name>Interop.Outlook</Nam e>
<HintPath>bin\Interop.Outl ook.dll</H intPath>
</Reference>
<Reference Include="Interop.Scripting ">
<Name>Interop.Scripting</N ame>
<HintPath>..\Utility.NET\b in\Interop .Scripting .dll</Hint Path>
</Reference>
<Reference Include="Interop.VBRUN">
<Name>Interop.VBRUN</Name>
<HintPath>..\Utility.NET\b in\Interop .VBRUN.dll </HintPath >
</Reference>
<Reference Include="Interop.Word">
<Name>Interop.Word</Name>
<HintPath>..\UTILITY_upgra de20081002 \bin\Inter op.Word.dl l</HintPat h>
</Reference>
<Reference Include="Microsoft.VisualB asic">
<Name>Microsoft.VisualBasi c</Name>
</Reference>
<Reference Include="Microsoft.VisualB asic.Compa tibility">
<Name>Microsoft.VisualBasi c.Compatib ility</Nam e>
</Reference>
<Reference Include="Microsoft.VisualB asic.Compa tibility.D ata">
<Name>Microsoft.VisualBasi c.Compatib ility.Data </Name>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Configurat ion" />
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
<Name>System.Drawing</Name >
</Reference>
<Reference Include="System.ServicePro cess" />
<Reference Include="System.Web">
<Name>System.Web</Name>
</Reference>
<Reference Include="System.Web.Extens ions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35, processorArchitecture=MSIL ">
<SpecificVersion>False</Sp ecificVers ion>
</Reference>
<Reference Include="System.Web.Servic es, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a, processorArchitecture=MSIL ">
<SpecificVersion>False</Sp ecificVers ion>
<HintPath>..\..\..\..\..\W INDOWS\ass embly\GAC_ MSIL\Syste m.Web.Serv ices\2.0.0 .0__b03f5f 7f11d50a3a \System.We b.Services .dll</Hint Path>
</Reference>
<Reference Include="System.Windows.Fo rms">
<Name>System.Windows.Forms </Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Axmscomctl" />
<Import Include="Microsoft.VisualB asic" />
<Import Include="System" />
<Import Include="System.Collection s" />
<Import Include="System.Data" />
<Import Include="System.Diagnostic s" />
<Import Include="System.Drawing" />
<Import Include="System.Windows.Fo rms" />
</ItemGroup>
I do see Interop.Microsoft.Office.C
How do I know which references are com?
emoreau,
I am not sure if the app uses the web and I would rather play with removing references after it compiles again.
Both: In playing with this last week (as I said I am not a .net developer so take what I found with a grain of salt) it looked like interop.MSComDlg may have been on of the issues and the ComCntrls, but not sure.
Opening the project file in a text editor, here are the references it uses:
<ItemGroup>
<Reference Include="ADODB">
<Name>adodb</Name>
<HintPath>..\..\..\..\..\P
<AssemblyFolderKey>hklm\pr
</Reference>
<Reference Include="AxInterop.MSComct
<Name>AxInterop.MSComctlLi
<HintPath>bin\AxInterop.MS
</Reference>
<Reference Include="AxInterop.MSComDl
<Name>AxInterop.MSComDlg</
<HintPath>bin\AxInterop.MS
</Reference>
<Reference Include="CrystalDecisions.
<Private>False</Private>
</Reference>
<Reference Include="CrystalDecisions.
<Reference Include="CrystalDecisions.
<Reference Include="CrystalDecisions.
<Reference Include="CrystalDecisions.
<Reference Include="CrystalDecisions.
<Private>False</Private>
</Reference>
<Reference Include="DataGridViewColum
<Reference Include="Interop.Excel">
<Name>Interop.Excel</Name>
<HintPath>..\UTILITY_upgra
</Reference>
<Reference Include="Interop.Microsoft
<Name>Interop.Microsoft.Of
<HintPath>..\Utility.NET\b
</Reference>
<Reference Include="Interop.MSAdodcLi
<Name>Interop.MSAdodcLib</
<HintPath>..\Utility.NET\b
</Reference>
<Reference Include="Interop.MSComDlg"
<Name>Interop.MSComDlg</Na
<HintPath>bin\Interop.MSCo
</Reference>
<Reference Include="Interop.MSCommLib
<Name>Interop.MSCommLib</N
<HintPath>..\Utility.NET\b
</Reference>
<Reference Include="Interop.Outlook">
<Name>Interop.Outlook</Nam
<HintPath>bin\Interop.Outl
</Reference>
<Reference Include="Interop.Scripting
<Name>Interop.Scripting</N
<HintPath>..\Utility.NET\b
</Reference>
<Reference Include="Interop.VBRUN">
<Name>Interop.VBRUN</Name>
<HintPath>..\Utility.NET\b
</Reference>
<Reference Include="Interop.Word">
<Name>Interop.Word</Name>
<HintPath>..\UTILITY_upgra
</Reference>
<Reference Include="Microsoft.VisualB
<Name>Microsoft.VisualBasi
</Reference>
<Reference Include="Microsoft.VisualB
<Name>Microsoft.VisualBasi
</Reference>
<Reference Include="Microsoft.VisualB
<Name>Microsoft.VisualBasi
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Configurat
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing">
<Name>System.Drawing</Name
</Reference>
<Reference Include="System.ServicePro
<Reference Include="System.Web">
<Name>System.Web</Name>
</Reference>
<Reference Include="System.Web.Extens
<SpecificVersion>False</Sp
</Reference>
<Reference Include="System.Web.Servic
<SpecificVersion>False</Sp
<HintPath>..\..\..\..\..\W
</Reference>
<Reference Include="System.Windows.Fo
<Name>System.Windows.Forms
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Axmscomctl" />
<Import Include="Microsoft.VisualB
<Import Include="System" />
<Import Include="System.Collection
<Import Include="System.Data" />
<Import Include="System.Diagnostic
<Import Include="System.Drawing" />
<Import Include="System.Windows.Fo
</ItemGroup>
Download and install the correct version of the Office Interop Assemblies from Microsoft. Here are couple of links
2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=3C9A983A-AC14-4125-8BA0-D36D67E0F4AD&displaylang=en
2007
http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=en
2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=3C9A983A-AC14-4125-8BA0-D36D67E0F4AD&displaylang=en
2007
http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=en
ASKER
The main form does have this error description:
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) C:\Documents and Settings\cw7007\VBNET_Publ ish\dotNet Utility_So urce\frmMa in.vb 614 0
Which is not overly helpful to me if it does not tell me what class is not registered. :(
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) C:\Documents and Settings\cw7007\VBNET_Publ
Which is not overly helpful to me if it does not tell me what class is not registered. :(
What is the frmMain line 614?
ASKER
CodeCruiser: But the office interops are not causing any problems and I can open the forms that use them. They are not referenced or used on the main form. I would rather get the code to a state that is equal to the original machine so it compiles and runs, then worry about cleaning it up. I know it is not very clean and the original consultant did not seem like they relaly knew what they were doing, and I plan to learn this enough to clean it up. At least I can already modify code and recompile on the old machine, so I am learning. ;)
ASKER
CodeCruiser: Line 614 says: Me.Cursor = System.Windows.Forms.Curso rs.Default
Is there a way to just jump to a given line number? I had to turn on line numbers to find what line it was.
Is there a way to just jump to a given line number? I had to turn on line numbers to find what line it was.
In the VS, you can see the line and column numbers in the right hand side of the status bar. May be a line above or below this is the problem source. Are there any other COM components being used? Did you install in PIAs on the new machine?
>>Is there a way to just jump to a given line number?
press CTRL-G
press CTRL-G
ASKER
CodeCruiser:
Lines 609 to 614:
Me.Controls.Add(Me.ToolStr ip1)
Me.Controls.Add(Me.ssStatu s)
Me.Controls.Add(Me.picPrin tScreen)
Me.Controls.Add(Me.imlTool barIcons)
Me.Controls.Add(Me.dlgComm onDialog)
Me.Cursor = System.Windows.Forms.Curso rs.Default
How do I tell what com components are there? And what is a PIA?
Lines 609 to 614:
Me.Controls.Add(Me.ToolStr
Me.Controls.Add(Me.ssStatu
Me.Controls.Add(Me.picPrin
Me.Controls.Add(Me.imlTool
Me.Controls.Add(Me.dlgComm
Me.Cursor = System.Windows.Forms.Curso
How do I tell what com components are there? And what is a PIA?
ASKER
emoreau: I did the cntrl-G (since it works in VB6 and other programs) but it just moves my focus from inside the form source code to the Immediate Window.
Your key assignement is not standard. Open the Edit menu and check the key assignment of the "Go To ..." item.
ASKER
emoreau,
Thank you. It had no assignment and in tools the editor was set to VB6. I changed it to default and now the goto line is set to cntrl-g.
Thank you. It had no assignment and in tools the editor was set to VB6. I changed it to default and now the goto line is set to cntrl-g.
PIA is Office Primary Interop Assemblies. I dont see any COM related stuff in the above lines of code.
ASKER
I set the debugging to include the .net stuff and not "Just my Code" and here is what IO now know, have:
When I debug into the initializeComponente I can follow it to the offending area. This line:
Me.imlToolbarIcons = New Axmscomctl.AxImageList
Is causeing issues in the routines. It leads eventually to this code in AxHost.cs:
private void CreateInstance() {
Debug.Assert(instance == null, "instance must be null");
//Debug.WriteLineIf(AxHTra ceSwitch.T raceVerbos e, "before created "+Windows.GetCurrentThread Id());
//Debug.WriteStackTraceIf( "AxHTrace" );
//checkThreadingModel();
try {
instance = CreateInstanceCore(this.cl sid);
Debug.Assert(instance != null, "w/o an exception being thrown we must have an object...");
}
catch (ExternalException e) {
if (e.ErrorCode == unchecked((int)0x80040112) ) { // CLASS_E_NOTLICENSED
throw new LicenseException(GetType() , this, SR.GetString(SR.AXNoLicens eToUse));
}
throw;
}
Debug.WriteLineIf(AxHTrace Switch.Tra ceVerbose, "created");
SetOcState(OC_LOADED);
}
Where the exception happend on the line that says throw;
When I debug into the initializeComponente I can follow it to the offending area. This line:
Me.imlToolbarIcons = New Axmscomctl.AxImageList
Is causeing issues in the routines. It leads eventually to this code in AxHost.cs:
private void CreateInstance() {
Debug.Assert(instance == null, "instance must be null");
//Debug.WriteLineIf(AxHTra
//Debug.WriteStackTraceIf(
//checkThreadingModel();
try {
instance = CreateInstanceCore(this.cl
Debug.Assert(instance != null, "w/o an exception being thrown we must have an object...");
}
catch (ExternalException e) {
if (e.ErrorCode == unchecked((int)0x80040112)
throw new LicenseException(GetType()
}
throw;
}
Debug.WriteLineIf(AxHTrace
SetOcState(OC_LOADED);
}
Where the exception happend on the line that says throw;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.