Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Visual Studio 2010 Windows Forms Designer displays a warning when you open an inherited form that contains members that have protected access


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You are developing an application in Visual Studio 2010.
  • You design a class library (.dll) project in Visual Basic that defines a base form.
  • The form contains one or more members whose modifiers are set to Protected or Protected Friend access. This access lets the members be overridden in derived types. 
  • The members are declared by using the WithEvents keyword in Visual Basic. This is the default behavior in Visual Basic.
  • You create a derived form in a C# project that inherits from the base form defined in the Visual Basic project.
  • You change the member with Protected or Protected Friend access to override one of its properties, such as Size.
  • You save and close the inherited form, and then you reopen the form.
In this scenario, you receive the following warning: 

The method or operation is not implemented.

↑ Back to the top


Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To obtain this hotfix, contact Microsoft Customer Service and Support to obtain the hotfix. 

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

Prerequisites

You must have Visual Studio 2010 installed to apply the hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix package.

Hotfix replacement information

This hotfix package does not replace a previously released hotfix package.

File Information

The English (United States) version of this hotfix package uses a Microsoft Windows Installer package to install the hotfix package. The dates and the times for these files are listed in Coordinated Universal Time (UTC) in the following table. When you view the file information, the date is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Microsoft.visualstudio.shell.design.dll10.0.30319.445522,12011-Mar-201123:46x86

↑ Back to the top


More Information

The following call stack is shown when this problem occurs:

at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkPropertyInfo.get_RuntimeProperty()

at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkPropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)

at Microsoft.VisualStudio.Shell.Design.PropertyInfoWrapper.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)

at System.Reflection.PropertyInfo.GetValue(Object obj, Object[] index)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyReferenceExpression(IDesignerSerializationManager manager, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

↑ Back to the top


Workaround

To work around this problem, use one of the following methods:
  • Set the Modifiers property of the control members to public.
  • Remove the WithEvents keyword in the base form class, and instead use the AddHandler statement to control event wiring.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbqfe, kbhotfixserver, kbfix, kbexpertiseadvanced, kbsurveynew, kbprogramming, kb

↑ Back to the top

Article Info
Article ID : 2284187
Revision : 1
Created on : 1/7/2017
Published on : 3/29/2011
Exists online : False
Views : 269