Microsoft KB Archive/159843

= PRB: GPF with MDI Child Form System Menu and Right Arrow Key =

Article ID: 159843

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q159843



SYMPTOMS
When you run a Visual Basic application on Windows 95 and you click the ControlBox at the upper-left corner of a MDIChild form and then press the right arrow key, you receive the following error:

VB caused a general protection fault in module USER.EXE at 0007:00005b71

This problem does not occur on Windows NT or if the MDIChild form has a menu.



WORKAROUND
You need to add a menu on the MDIChild form to work around this problem.


 * 1) Start a new project in Visual Basic. Form1 is created by default.
 * 2) Change MDIChild property of Form1 to "True."
 * 3) Insert a MDIForm.
 * 4) Bring the MDIChild form, Form1, to the foreground.
 * 5) Select Tools/Menu Editor.
 * 6) Fill in the Caption field or leave it blank.
 * 7) Fill in the Name field with a name, for example, MnuHidden. Leave the other fields unchanged. "Visible" must be checked. Otherwise, a GPF will occur.
 * 8) Click OK, and run the program. Press the RIGHT ARROW key to switch back and forth between the system menus of the parent and child forms.

(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by May Ji, Microsoft Corporation



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior

 * 1) Start a new project in Visual Basic. Form1 is created by default.
 * 2) Change the MDIChild property of Form1 to "True."
 * 3) Insert a MDIForm.
 * 4) Run the program.
 * 5) Click the ControlBox at the upper-left corner of Form1 (the MDIChild form. The system menu drops down.
 * 6) Press the RIGHT ARROW key and note that Windows 95 or Windows 98 displays a General Protection Fault dialog box and terminates the application.

Keywords: kbprb KB159843

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.