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

Last reviewed: July 15, 1997
Article ID: Q159843

The information in this article applies to:

  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SYMPTOMS

When you run a Visual Basic application on Windows 95, a General Protection Fault (GPF) occurs if you click the ControlBox at the upper-left corner of a MDIChild form and then press the RIGHT ARROW key. This problem does not occur on Windows NT, or if the MDIChild form has a menu.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Load Visual Basic 4.0. Form1 is the default form.

  2. Change 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, for example, the MDIChild form. The system menu drops down.

  6. Press the RIGHT ARROW key and note that Windows 95 displays a General Protection Fault dialog box and terminates the application.

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.

WORKAROUND

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

  1. Start Visual Basic 4.0. 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


Additional query words: vb4win vb4all
Keywords : VB4ALL VB4WIN kbbuglist kbprg
Version : 4.00
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 15, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.