hi all,
i get the following error in my VB.NET app, which was by the way upgraded from a VB6 app:
"An unhandled exception of type System.Runtime.InteropServices.COMException occurred in Patroklos.exe
Additional information: ImageList must be initialized before it can be used
Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A8B1D): ImageList must be initialized before it can be used
at MSComctlLib.NodesClass.Add(Object& Relative, Object& Relationship, Object& Key, Object& Text, Object& Image, Object& SelectedImage)
at Patroklos.CourseSelPanel.PopulateLevel(Int16 ContextLevel, Int16 ALevel, Int16 BLevel, Int16 CLevel, Int16 DLevel) in C:\Mentor\Source Code\mentor_proj\Patroklos.NET1\CourseSelPanel.vb:line 469"
where line 469 is:
Call StructureList.Nodes.Add(, , SubKey, DisplayValue, ImageValue)
SubKey, DisplayValue, and ImageValue are all declared as String.
StructureList is declared as follows:
Public WithEvents StructureList As AxMSComctlLib.AxTreeView
And ImageList was declared as:
Public WithEvents ListIcons As AxMSComctlLib.AxImageList
I think ImageList is already intialized since i have the following lines of code:
Me.ListIcons = New AxMSComctlLib.AxImageList
.....................
CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).BeginInit()
.....................
Me.ListIcons.Enabled = True
Me.ListIcons.Location = New System.Drawing.Point(208, 424)
Me.ListIcons.Name = "ListIcons"
Me.ListIcons.OcxState = CType(resources.GetObject("ListIcons.OcxState"), System.Windows.Forms.AxHost.State)
Me.ListIcons.Size = New System.Drawing.Size(38, 38)
Me.ListIcons.TabIndex = 7
.........................
Me.Controls.Add(Me.ListIcons
..........................
CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).EndInit()
..........................
any help would be appreciated.
i get the following error in my VB.NET app, which was by the way upgraded from a VB6 app:
"An unhandled exception of type System.Runtime.InteropServices.COMException occurred in Patroklos.exe
Additional information: ImageList must be initialized before it can be used
Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A8B1D): ImageList must be initialized before it can be used
at MSComctlLib.NodesClass.Add(Object& Relative, Object& Relationship, Object& Key, Object& Text, Object& Image, Object& SelectedImage)
at Patroklos.CourseSelPanel.PopulateLevel(Int16 ContextLevel, Int16 ALevel, Int16 BLevel, Int16 CLevel, Int16 DLevel) in C:\Mentor\Source Code\mentor_proj\Patroklos.NET1\CourseSelPanel.vb:line 469"
where line 469 is:
Call StructureList.Nodes.Add(, , SubKey, DisplayValue, ImageValue)
SubKey, DisplayValue, and ImageValue are all declared as String.
StructureList is declared as follows:
Public WithEvents StructureList As AxMSComctlLib.AxTreeView
And ImageList was declared as:
Public WithEvents ListIcons As AxMSComctlLib.AxImageList
I think ImageList is already intialized since i have the following lines of code:
Me.ListIcons = New AxMSComctlLib.AxImageList
.....................
CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).BeginInit()
.....................
Me.ListIcons.Enabled = True
Me.ListIcons.Location = New System.Drawing.Point(208, 424)
Me.ListIcons.Name = "ListIcons"
Me.ListIcons.OcxState = CType(resources.GetObject("ListIcons.OcxState"), System.Windows.Forms.AxHost.State)
Me.ListIcons.Size = New System.Drawing.Size(38, 38)
Me.ListIcons.TabIndex = 7
.........................
Me.Controls.Add(Me.ListIcons
..........................
CType(Me.ListIcons, System.ComponentModel.ISupportInitialize).EndInit()
..........................
any help would be appreciated.
Last edited by a moderator: