VB5 Bugs and Issues

Available Service Packs

A service pack is basically a product update provided by the product manufacturer to fix bugs and sometimes provide minor new features. The service packs currently available for Visual Basic are listed in the table below.

Service Pack (SP) Name Description Availability Date
Visual Studio 97 SP 3 This service pack provides updates to Visual Studio '97, VB 5, VC++ 5, Visual InterDev, Visual J++ 1.1, and Visual SourceSafe 5. SP3 is a superset of SP2 and SP1. 1/9/97

Current List of VB5 Bugs and Issues

Yes, I know it is hard to believe that there would be bugs or issues with VB5. Here is our initial list of them with links to the Microsoft site for more details, where appropriate. NOTE: over the next few weeks we plan to retest these listed bugs with SP2 and mark all of those that have indeed been fixed.

If you find other bugs or issues with VB5, let us know and we will post them. Click here to email us.

Installation and Compatibility Issues

Bug Name Bug Description Status/Link Reported By
COMCTL32.OCX Is Binary Incompatible with Previous Version Your application may experience a crash if it was created using COMCTL32.OCX version 5.00.3422 and your system has been upgraded to COMCTL32.OCX version 5.00.3714. Version 5.00.3422 shipped in the Microsoft Office Developer's Edition 97 and in Beta-1 of the Visual Basic Control Creation Edition. Corrected in SP1

KB Article ID: Q167123

MS
Updated Automation System Files You can download the current Automation libraries (formerly called OLE Automation). KB Article ID: Q164529 MS
Problems Using Visual Basic 5.0 and 4.0 on Same System There are some issues with running VB4 (32-bit) and VB5 on the same machine. Microsoft's solution is a dual-boot computer. See the link for details on how to set that up. (We're looking at alternative solutions to this problem.) KB Article ID: Q161344 MS
"Unexpected error; quitting" Installing VB4 Application This will happen when using new versions of Olepro32.dll with VB4. Microsoft provides two options for solving this problem. See the link for details. KB Article ID: Q162518 MS
AUTMGR32.EXE fails after component download   Corrected in SP1

KB Article ID: Q167951

MS

IDE Bugs

Bug Name Bug Description Link Reported By
GPF occurs when starting VB 5.0 When Visual Basic starts and the IDE is displayed, a GPF (General Protection Fault) occurs and Visual Basic does not load.

This problem may be caused by faulty Visual Basic 4.0 add-ins or invalid command bar configuration information in the system registry.

Use this link for instructions to prevent add-ins from being loaded when Visual Basic starts.

To fix invalid command bar references in the registry, exit VB and then:

1.Start Regedit.exe.
2.Delete the following key:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Visual Basic\5.0

3.Close Regedit.
4.Restart Visual Basic.

KB Article ID: Q167346 MS
Invalid Page Fault When Shutting Down Visual Basic 5.0 This crash is caused by a problem in the way Visual Basic 5.0 destroys command bars during shut down. KB Article ID: Q167213 MS
VB crashes when you use the F4 key If you have a custom toolbar created in the VB IDE and it contains the horizontal alignment button form the category "Format", you will get this crash.
To reproduce this error:
  1. Create the custom toolbar with the horizontal alignment button on it.
  2. Create a new project.
  3. Put two text boxes on the form.
  4. Select both text boxes.
  5. Press the F4 key.
  6. CRASH!

Work around this problem by removing the horizontal alignment button from your custom toolbar. You can put the options in a menu instead of a toolbar to prevent this problem.
None Larry Nuttall
Command line arguments are truncated to 255 characters. Steps to reproduce the problem:

In VB5 IDE, do:
1) Project | Properties.
2) Select the tab "Make".
3) In the field "Command line arguments" type more than 255 chars.
4) Press OK.
5) Again do Project | Properties
6) Look that the "Command line arguments" field, it has been truncated at 255 chars.

None Fabio Pagano - Bari - Italy
Setting form start-up for an MDIchild window can cause all controls on the form to be deleted. Steps to reproduce the problem:

In the VB5 IDE, do:
1) Open a new EXE Project
2) On the default form, add a command button (or any controls)
3) DblClick the button, add some code.
4) Open the Properties window for the Form, Change MDIChild to TRUE
5) Save the form, project file.
6) Open Layout Window.
7) Right-click on the form image in the layout window and set StartupPosition to Center Owner. (Or anything except Manual).
8) Save
9) Close the form
10) Open the form. You will get "Invalid Property". Click OK. Controls are gone.

NOTE: If you close VB immediately after saving the form, the invalid property is saved in the FRM file. However, when you open VB again, you get an error message, but the controls are all there.

  Jonas Muliolis
In the Customize dialog box to customize the menus, the Description and "?" buttons don't do anything Steps to reproduce the problem:

In VB5 IDE, do:
1) Right click on the menu.
2) Select Customize.
3) Click on the "?" button, it does nothing.
4) Click on the Commands tabe.
5) Click on the Description button, it does nothing.

None Ron Schwarz

ActiveX Bugs

Bug Name Bug Description LinkReported By
IE3.0 displays garbage instead of an ActiveX document. After deploying an ActiveX document on a UNIX Web server, the document is not displayed correctly in IE3.0. Here is the solution! Deborah Kurata
OLE error 80010005 when using timers in a client application. Client application has a timer control. The timer event sets a property in an ActiveX EXE application. When run in the IDE, the code works. When run compiled, the error is generated. Sample code Steve Squires
Unexpected error when compiling an ActiveX EXE or DLL. The following error may occur when compiling an ActiveX Server (EXE or DLL):

"An unexpected error occurred during compiling or linking"

If you choose to view the error details, the following message will be displayed:

"LINK : fatal error LNK1104: cannot open file <filename>"

This is generated because when the Binary Compatibility property is set for an ActiveX Server component (.EXE or .DLL), Microsoft Visual Basic 5.0 leaves the compatible source file in an open state until the Visual Basic 5.0 environment is closed.

NOTE: The behavior can also surface randomly with other types of Visual Basic projects when Binary Compatibility is used.

Workarounds:

•When using the Binary Compatibility property, do not set the compatible source file to the same filename and location as the compiled component's destination file.
-or- •Use the Project Compatibility option or the No Compatibility option.
-or- •Close and re-open the Microsoft Visual Basic environment when it is necessary to delete and/or overwrite the file which is locked in the open state.
KB Article ID: Q168414 Microsoft
Permission Denied error when compiling an ActiveX DLL Visual Basic does not unload an ActiveX DLL when running an application in the IDE. So if you have a reference set to the .DLL and then try to recompile the DLL, you will get this error. Here are the steps to reproduce:
  1. Create an ActiveX DLL.
  2. Add a standard EXE to the project group to test the DLL.
  3. Add a reference in the standard EXE to the DLL.
  4. Compile the DLL.
  5. Remove the DLL from the group. This resets the reference from the ActiveX DLL project to the DLL itself.
  6. Test again. Things should be fine.
  7. Re-add the DLL to the project group.
  8. Recompile the DLL. You will now get this error.

The work around is reset the reference from the ActiveX DLL (.dll) to the ActiveX DLL project (.vbp) and then recompile.

   

Form and Control Bugs

Bug Name Bug Description LinkReported By
Setting ComboBox Control Text in Click Event Wipes Out Text. When setting the ComboBox control Text property in the Click event of ComboBox control, the text always returns blank. This is different behavior than Visual Basic 3.0 and Visual Basic 4.0. KB Article ID: Q168824 MS
Rich Text Box Control Does Not Word Wrap Setting the Multiline property of a Rich Text Box control to True does not behave as expected. By setting Multiline to True, words should wrap when they are typed or displayed in a Rich Text Box control. However, they do not. KB Article ID: Q167106 MS
DBCombo Control Change Event Does Not Fire Program code in the Change event procedure of Microsoft Visual Basic version 5.0 will not execute. Applications written using Visual Basic version 4.0 may no longer work as expected if functionality is based on responding to a Change event in a DBCombo control. KB Article ID: Q166929 MS
FindItem Method of ListView Incorrectly Returns an Error Applications compiled and tested with earlier versions of the ListView control may encounter an unexpected error:

"Run-time error '35600': Index out of bounds"

when running on a system with version 5.00.3714 of COMCTL32.OCX. This unexpected error may cause the application to crash if it was not designed to handle unexpected errors. This is most commonly seen when the FindItem method is called to search on the item Tags or SubItems and the ListView is empty.
Corrected in SP1

KB Article ID: Q167122

MS
Crash when resizing column of split DBGrid. An application error is generated when a column of a DBGrid is resized if the column had been split using the Split method. Corrected in SP1

KB Article ID: Q168155

MS
Missing Controls on the SSTAB Control Tabs One or more of the tabs on the SSTAB control is missing its controls when displayed at run-time. KB Article ID: Q167107 MS
Unloading an MDI parent from an MDI child locks up the application. (Note: this is also a bug in VB4) To reproduce:
  1. Add an MDI parent form to a sample application.
  2. Set form1 MDIChild property to True.
  3. In the Form_Unload event for the MDI child application, add the following line of code: Unload MDIForm1.
  4. Run the application. It will hang.
  Craig Clearman
Max length property does not work correctly on PanEuro Windows 95. To reproduce:
  1. Use the PanEuro version of Windows 95.
  2. Add two text boxes.
  3. Set the maxLength property to 8.
  4. Add the following code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    SendKeys "{tab}"
    KeyAscii = 0
    End If
    End Sub
  5. Run the application, type in 8 characters and press the Enter key. In the US version of Windows this moves the cursor to the next field. In the PanEuro version it beeps and will not move to the next field.
  Alesh Mustar
The ListIndex property of a List box is an integer instead of a long. To reproduce:
  1. Add a list box to a form.
  2. Add the following code:
    Private Sub Form_Load()
    Dim i As Long
    For i = 0 To 70000
    List1.AddItem "Item " & i
    Next i
    End Sub

    Private Sub List1_Click()
    Me.Caption = "ListIndex: " & List1.ListIndex _
    & "Converted: " & CLng("&H" & Hex(List1.ListIndex))
    End Sub
  3. Run the application. The form may take a while to load.
  4. Try accessing a number after 32767. The listIndex is invalid but the converted index is correct.
  5. Try accessing a number after 65532. Both values are invalid.
  Karl Peterson

Data Access Bugs

Bug Name Bug Description LinkReported By
Memory leak when calling UserConnection Query Event Repeatedly running queries on UserConnections that use the ODBC cursor library causes a memory leak. This problem does not occur when using the other available cursor libraries. Corrected in SP1

KB Article ID: Q168163

MS
DBGrid bound to a remote data control has errors. A DBGrid control bound to a remote data control (RDC) has several problems:
(1) it displays a single row after a MoveLast
(2) it displays small resultsets incorrectly: if the resultset contains fewer rows than the DBGrid has space to display, the DBGrid shows multiple copies of each row
(3) it generates an error if attempting to programatically close resultset
Corrected in SP1

KB Article ID: Q168153

KB Article ID: Q168156

KB Article ID: Q168158

MS
DBCombo updates incorrectly when using remote data control (RDC) bound ListSource. The DBCombo may not update correctly when multiple RDC controls exist on the same form. Corrected in SP1

KB Article ID: Q168159

MS
Problems binding multiple controls to RDC 2.0.   Corrected in SP1

KB Article ID: Q168157

MS
Error on Update after AddNew with remote data control (RDC) and bound controls. After adding a new row to a table with the RDC, navigating through the resultset may yield an error such as "Invalid result set state for Update." Corrected in SP1

KB Article ID: Q168160

MS
RDO Move 0 fails to refresh record. Documentation for the Move method states that, after issuing a Move 0, "any pending edits are discarded and the current row is refreshed from the data source."

This behavior does not occur with the version of the RDO 2.0 engine that shipped with Visual Basic.
Corrected in SP1

KB Article ID: Q168162

MS
Distributed transaction fails on subsequent runs. Using distributed transactions from RDO 2.0 may generate an error stating that the connection is invalid. The problem may occur when RDO loads the Distributed Transaction Coordinator (DTC) components after having previously unloaded them. RDO no longer unloads the DTC components when it is unloaded from memory. The DTC components are then unloaded when the process ends. Corrected in SP1

KB Article ID: Q168161

MS
DAO Internet component download fails to install. If Office97 is already installed, the MSJET35.CAB file fails to install. This is because the version of VBAJET32.DLL installed by Office97 does not register as a Win32 DLL. Internet Explorer looks for this property in DLLs that are to be overwritten and will fail to download if this property is not found.

The MSJET35.CAB file and the setup toolkit have been updated. DAO will install correctly even if the Office97 version of VBAJET32.DLL is on the client system.
Corrected in SP1

KB Article ID: Q167950

MS

Other Bugs

Bug Name Bug Description LinkReported By
Invalid Use of Null error when using the Write statement and a date value from a recordset If you retrieve a date value from a recordset and attempt to write it to a file using the Write statement, the code will generate an "Invalid Use of Null".

To work around this bug, you can use the Format statement around the date value as follows:

Write #1, Format$(rsInvoices!OrderDate)

Sample Code Patrick Harvey, Sandfield Associates Ltd, Auckland, NZ
Large UDT structures sometimes cause VB5 to crash. When using a large UDT structure, VB 5 will sometimes crash when the application is compiled or run. Sample Code Joe Martin
The Show method will no longer bring MDI child forms to the top. In prior versions of VB, you could use the Show method to bring MDI child forms to the top. This no longer works. You must instead use the ZOrder method. Sample Code

KB Article ID: Q168850

Simon Wadsworth
Cannot set the default printer. If you set the Printer object to another printer, it will ignore it and print to the default printer. You can get around this by using the Windows API to set the system default printer. Code for this is in the KB article. KB Article ID: Q167735 Don Bradner, MS

"Features"

Feature Name Feature Description LinkReported By
A public member of a class does not behave like a public member of a standard module If you pass a public variable from a standard module to a routine that increments that value, the value will be incremented. If you pass a public variable from a class, it will not be incremented.

This is because public variables in a class are treated as if they were property procedures. The value of the property is then passed to the routine instead of the reference to the variable, so the value is not seen as incremented. Download the sample code to see how this works.

Sample Code Patrick Steele as seen in dejanews
All contents © 2004 InStep Technologies, Inc. All rights reserved.