Error message when you upgrade a Visual Basic 6.0 project to Visual Basic .NET 2003: "UserControlName.ToolboxBitmap was not upgraded" (820650)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
SYMPTOMSIn Microsoft Visual Basic
6.0, if you upgrade an ActiveX Control project or a project that contains a
user control file by using the Visual Basic Upgrade Wizard, and the ToolboxBitmap property is set for the user control file, then the Visual Basic Upgrade Wizard
reports the following error: UserControl property
UserControlName.ToolboxBitmap was not upgraded. Therefore, when you
build your project in Microsoft Visual Basic .NET, you receive the default
bitmap of the user control file that is in the toolbox instead of the ToolboxBitmap that you selected in the Visual Basic 6.0 project. WORKAROUNDTo work around this problem, add the ToolboxBitmapAttribute to the user control after you upgrade your Visual Basic 6.0
project. To do this, follow these steps:
- In Solution Explorer, right-click
Project Name, point to
Add, and then click Add Existing
Item.
- Locate the .bmp file that is associated with the user
control file, and then click Open.
- Rename the .bmp file to the user control name.
For example, if the user control name is
UserControl1, rename the .bmp file
UserControl1.bmp. - In Solution Explorer, right-click the .bmp file, and then
click Properties.
- In the Properties window, set the Build
Action property to Embedded Resource.
- In Solution Explorer, right-click
UserControl1.vb, and then click View Code.
- Add the following ToolboxBitmap attribute
to the UserControl1 class:
<ToolboxBitmap(GetType(UserControl1), "UserControl1.BMP")> _
Public Class UserControl1
...
End Class
STATUS This
behavior is by design.
Modification Type: | Minor | Last Reviewed: | 2/3/2006 |
---|
Keywords: | kbvs2005doesnotapply kbvs2005swept kbControl kbUpgrade kbprb KB820650 kbAudDeveloper |
---|
|