BUG: The resource context for the Image property of multiple controls is changed to a local resource image after you set it to the project resource image in Visual Studio 2005 (913455)



The information in this article applies to:

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
  • Microsoft Visual Studio 2005 Team System Architect Edition
  • Microsoft Visual Studio 2005 Team System Developer Edition

SYMPTOMS

Consider the following scenario:
  • In Microsoft Visual Studio 2005, you open a Microsoft Windows Form.
  • You add some controls that have an Image property.
  • You select several of these controls, and then set the Image property on all the selected controls to a project resource image.
In this scenario, the resource context for the Image property of these controls is changed to a local resource image.

CAUSE

This problem occurs because the project resource setting is not applied when you copy the Image property across multiple selected objects. Instead, the local resource setting is applied to the Image property of each selected object.

WORKAROUND

To work around this problem, follow these steps:
  1. Select the first control that you added to the Windows Form.
  2. Set the Image property of this control to a project resource.
  3. Repeat steps 1 and 2 for each control that you added to the Windows Form.

STATUS

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

MORE INFORMATION

Steps to reproduce the problem

  1. In Visual Studio 2005, create a Windows application by using the programming language that you prefer.
  2. Add five Button controls.
  3. Select one Button control, and then click the ellipsis button (...) next to the Image property in the Properties window.
  4. Select Project resource file, and then click Import to import some picture files.
  5. Click OK.
  6. Hold down the CTRL key, and then select the other four Button controls.
  7. In the Properties window, click the ellipsis button next to the Image property of each control.
  8. Select Project resource file, and then select one of the pictures that you imported.
  9. Click OK.
  10. In the Properties window of one Button control that you selected in step 6, click the ellipsis button next to the Image property. Notice that Local resource is selected.

Modification Type:MajorLast Reviewed:2/28/2006
Keywords:kbExpertiseAdvanced kbvs2005std kbvs2005pro kbvs2005exp kbtshoot kbbug KB913455 kbAudDeveloper kbAudITPRO