Microsoft KB Archive/169364

From BetaArchive Wiki

Article ID: 169364

Article Last Modified on 10/16/2002


  • Microsoft Visual FoxPro 5.0 Standard Edition

This article was previously published under Q169364


When you issue a CLEAR CLASS command to clear a control class in a container, Visual FoxPro has a GPF (General Protection Fault) and close.


Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Microsoft Visual FoxPro version 5.0a for Windows.


In Visual FoxPro 5.0, create a form class that has a container such as PageFrame. In that PageFrame container, place a control that's created from a VCX-based class. Once the form is instantiated, released, and you execute a CLEAR CLASS command for that control class in the container, it causes the GPF.

Steps to Reproduce Behavior

  1. Create a button class in Class Designer. Name the button class as mybutton and the class library as TestIPF.
  2. Create a form class in Class Designer.
  3. Add a PageFrame control to the form class, then subclass the above button class in Page1 of the PageFrame control.
  4. Save the form class into the class library, TestIPF as testform.
  5. Create a .PRG, and put the following code into the .PRG:

          LOCAL oForm
          CLEAR CLASS testform
          CLEAR CLASS testbutton  && IPF here
  6. Save and run the .PRG.

Immediately after you run the form, the GPF occurs when the execution hits the CLEAR CLASS command.

Keywords: kbbug kbfix kbvfp500afix KB169364