FIX: Form Does Not Close After Using PEMSTATUS() (221740)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q221740

SYMPTOMS

After calling the PEMSTATUS() function within a form, you cannot release the form object using the Close button (in the upper right corner of the form) or Close on the File menu. Even issuing a
_Screen.ActiveForm.Release 
				
command does not release the form object from memory.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a program that contains the following code:
    PUBLIC goForm
    goForm = CreateObject('Demo11')
    goForm.Show()
    *
    * Form class to show
    *
    DEFINE CLASS Demo11 AS Form
    *
    * Add a command button to click
    *
    ADD OBJECT cmdDemo AS CommandButton WITH Top = 25, Left = 25, Height = 25, Caption = 'Call PemStatus()'
    *
    * Called when the command button is clicked
    *
    PROCEDURE cmdDemo.Click()
    *
    * Three nested class to PemStatus() cause the form object not to be released
    * Remove these lines for form to operate as expected
    *
    IF    PemStatus(_SCREEN.ActiveForm, 'Click', 5) ;
      AND PemStatus(_SCREEN.ActiveForm, 'Init', 5) ;
      AND PemStatus(_SCREEN.ActiveForm, 'Load', 5)
    ENDIF
    RETURN
    ENDDEFINE
    						
  2. Run the program.
  3. Click the Call PemStatus() command button.
  4. Close the form using the Close button or Close on the File menu.
Note that the form does not close. To close it, type the following in the Command window:
CLEAR ALL
				

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbBug kbContainer kbCtrl kbfix kbVS600sp3fix KB221740