The information in this article applies to:
REFERENCES
For additional information, see the following article in the Microsoft
Knowledge Base:
Q161137 : HOWTO: Use Project and Binary Compatibility See also the following section in the Visual Basic 5.0 Books Online: Visual Basic 5.0 Components Guide, Chapter 7, "Debugging, Testing, and Deploying Components" SYMPTOMS
If a Visual Basic project uses a custom control (.OCX) whose CLSID has
changed since the project was last opened, the following message will be
displayed when opening the project:
After choosing "Yes," a second message will occur two times:
Once the project is opened, all occurrences of the custom control have been replaced with PictureBox controls. CAUSE
When Visual Basic attempts to load a custom control, each control is
verified by its CLSID. If the CLSID stored with the project differs from
the CLSID of the custom control, Visual Basic cannot load the control. In
an attempt to maintain as many properties as possible, Visual Basic
replaces the missing control with a PictureBox control. The code associated
with the missing control is retained.
RESOLUTION
The CLSID of each custom control is saved in the project file (.VBP). The VBP file may be opened with Notepad or any text editor. If you know the new CLSID for the new version of the custom control, the VBP file can be modified to reflect this change in CLSIDs. NOTE: Version compatibility in custom controls is used to ensure that your new version of a custom control will not break backward compatibility with applications that may be using older versions of your custom control. Following the example below to modify the project file with the new CLSID could result in unexpected errors in your application. For example, if your custom control, named Custom.OCX, appears in your project, a line in the VBP file could read as follows:
You can modify the CLSID in the above line,
with the new CLSID of the Custom.Ocx. Saving the VBP file and reopening the project with Visual Basic should solve the problem. To obtain the new CLSID of your custom control, you may need to search the system registry or use a tool such as OLE2VIEW.EXE that can provide such information. The utility, OLE2VIEW.EXE, can be downloaded from the Microsoft Internet site at http://www.microsoft.com. To find the download file, search for "OLE2VIEW." STATUSThis behavior is by design.
Keywords : kbenv kbtshoot kbui kbusage kbVBp500 kbVBp600 kbGrpVB VBCCE VBKBAX VBKBComp VBKBCtrl VBKBDesignTime VBKBEnv VBKBVB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |