Microsoft KB Archive/820625

= You receive a &quot;System.MissingMemberException&quot; error message while you use an ActiveX Imagelist control =

Article ID: 820625

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft Visual Basic .NET 2002 Standard Edition

-





SYMPTOMS
You may have a Microsoft Windows Form with an ImageList property of an ActiveX control (such as TreeView, ImageCombo, Toolbar, or ListView) set to the ImageList ActiveX control. When you retrieve values or modify values, such as adding images or deleting images, of the ActiveX control Imagelist property, you may receive the following error message:

An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll

Additional information: Public member 'Property' on type 'ExtenderProxy' not found.



CAUSE
Visual Basic 6.0 ActiveX Controls support the IExtender interface that permits you to add additional properties to the default interface of the controls. When you use these ActiveX Controls in Visual Basic .NET, the AxHost class supports the IExtender interface. Therefore, AxHost adds some properties to these ActiveX Controls. However, AxHost does not add the remaining properties to the default interface of the ActiveX Controls. This problem occurs because of a broken IReflect implementation on the ExtenderProxy. Therefore, the properties of the ImageList control are not added to the ActiveX controls (such as Toolbar and TreeView), and you may see the error message at run time.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was corrected in Visual Basic .NET (2003).



Steps to Reproduce the Problem
 Create a new Windows application in Microsoft Visual Studio .NET by using Visual Basic .NET.

By default, Form1 is created. On the Tools menu, click Customize Toolbox. On the COM Components tab, click to select Microsoft ImageList Control 6.0 (SP4) and Microsoft ImageComboBox Control 6.0 (SP4) and then click OK. From the Toolbox, drag an ImageComboCtl control and an ImageListCtrl control to Form1. Right-click AxImageList1 and then click ActiveX-Properties. In Properties, click the Images tab and then click Insert Picture.</li> Move to the Flags folder by following the corresponding path on your computer:

%Program Files%\Microsoft Visual Studio .NET\Common7\Graphics\icons\Flags

Select some files and then click Open.</li> From the Toolbox, drag a Button control to Form1.</li>  Add the following code to the Button1_Click event handler.

Visual Basic .NET Code 'Set the ImageList property of ImageCombo control. AxImageCombo1.ImageList = AxImageList1.GetOcx 'Remove the image from AxImageList1 with the bound AxImageCombo1 control. AxImageCombo1.ImageList.ListImages.Remove(1) </li> On the Debug menu, click Start.</li> Click Button1. You receive the error message in the &quot;Symptoms&quot; section.</li></ol>

<div class="references_section">