Microsoft KB Archive/171822

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


Article ID: 171822

Article Last Modified on 12/10/2003



APPLIES TO

  • Microsoft Visual Basic 5.0 Control Creation Edition
  • Microsoft Visual Basic 5.0 Learning Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition



This article was previously published under Q171822

SYMPTOMS

Adding a routine to UserControl while in Break Mode may result in the following error:

"VB5 caused an invalid page fault in module VB5.EXE at <address>"

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2.

For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:

170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why


For a list of the Visual Basic 5.0 bugs that were fixed in the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:

171554 INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 2


MORE INFORMATION

Steps to Reproduce Behavior

This bug is spurious and may be difficult to reproduce.

  1. Start a new Standard Exe project.
  2. Select File | Add Project to add an ActiveX Control project. UserControl1 is created by default.
  3. Select Project | Add User Control to add a second UserControl (UserControl2) to the ActiveX Control project.
  4. Close UserControl2's design window.
  5. Place an instance of UserControl2(UserControl21) on UserControl1.
  6. Add the following code to UserControl1's code window:

          Private Sub UserControl_Initialize()
             UserControl21.Test = True
          End Sub
                            
  7. Close UserControl1's code and design windows.
  8. Place an instance of UserControl1 on the Standard Exe's Form1.
  9. Click Ok to the method or data member not found error. You now in break mode.
  10. Open the UserControl2's code window.
  11. Type in the following code and hit <Enter>.

          Public Function Test ()
                            

The result is that Visual Basic may crash.

Keywords: kbbug kbfix kbvbp500sp2fix kbvs97sp2fix KB171822