The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows, version 3.0
You may encounter the following error when running a Visual Basic executable (EXE) file:
Or you may encounter the following error when loading a Visual Basic project or form:
Error loading '<form filename>'. A control could not be loaded due to a load error. Continue?
This problem will occur when you have installed a new version of a custom control and the internal property list of the control has incorrectly changed in a way that breaks backward compatibility.
This problem is known to occur when you have installed the Visual Basic version 3.0 GRID.VBX file over an earlier version of the grid. Specifically, the problem will occur for an existing Visual Basic application, built using a previous version of the grid, that sets the HelpContextID property of the grid.
In the case where the problem occurs when you load a project into Visual Basic that contains a grid, the problem will only occur when the form file(s) containing the grid have been saved in binary format.
This problem is also known to occur when using Visual Basic version 2.0 and the CMDIALOG.VBX control. For more information on this problem, please see the following article in the Microsoft Knowledge Base:
Q100611 : FIX: VB 2.0 Prof Demo Causes Error: Invalid File Format
There are several ways that you can work around this problem:
If you are using a Visual Basic version 3.0 application and you encounter this problem, you can:
- Acquire an updated copy of GRID.VBX from Microsoft (see instructions in the More Information section below).
- Replace the Visual Basic version 3.0 of GRID.VBX with an earlier version. A disadvantage of this strategy is that applications requiring the Visual Basic version 3.0 grid will not run.
If you are a developer of a Visual Basic version 3.0 application that uses the grid, you can:
- Acquire an updated copy of GRID.VBX from Microsoft (see instructions in the More Information section below). You will need to build your application using this grid.
- Rename GRID.VBX to a different name such as MSGRID3.VBX and rebuild the application using the renamed grid. A disadvantage of this strategy is that the grid will not be automatically updated when a new version of the grid (such as a version of the grid containing bug fixes) is released.
The following shows the date, time, size, and version number of the GRID.VBX file that leads to this problem:
Time: 12:00 a.m.
Version: Not Marked
The following shows the date, time, size, and version number of the GRID.VBX file that fixes this problem:
Time: 5:26 p.m.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. The problem is corrected by the updated version of GRID.VBX.
The following file is available for download from the Microsoft Software Library:
For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 : How to Obtain Microsoft Support Files from Online Services
Steps to Reproduce Problem
- Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.
- Add a Visual Basic version 1.0 or 2.0 version of GRID.VBX to Form1.
- Put a grid control (Grid1) on Form1
- Set the HelpContextID property of Grid1 to 1 (or some non-zero value).
- From the File menu, choose Make EXE File (ALT, F, K) and create an EXE called PROJECT1.EXE.
- Replace the older version of grid with the Visual Basic version 3.0 version of GRID.VBX, which has a date and time of 28-APR-1993 12:00 am.
- Run the PROJECT1.EXE file created in step 5.
You should encounter an "Invalid file format" error. If you replace the Visual Basic version 3.0 grid with the version of the grid used in Step 2 and re-run PROJECT1.EXE, the program should run correctly.
Additional query words: kbfile softlib update3.00 S14643
Keywords : kbVBp300 kbGrpVB PrgCtrlsStd
Version : 3.00
Platform : WINDOWS
Issue type :