Microsoft KB Archive/221740

= FIX: Form Does Not Close After Using PEMSTATUS =

Article ID: 221740

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



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



Steps to Reproduce Behavior
  Create a program that contains the following code:

PUBLIC goForm goForm = CreateObject('Demo11') goForm.Show DEFINE CLASS Demo11 AS Form ADD OBJECT cmdDemo AS CommandButton WITH Top = 25, Left = 25, Height = 25, Caption = 'Call PemStatus' PROCEDURE cmdDemo.Click IF   PemStatus(_SCREEN.ActiveForm, 'Click', 5) ; AND PemStatus(_SCREEN.ActiveForm, 'Init', 5) ; AND PemStatus(_SCREEN.ActiveForm, 'Load', 5) ENDIF RETURN ENDDEFINE  Run the program. Click the Call PemStatus command button. Close the form using the Close button or Close on the File menu.
 * Form class to show
 * Form class to show
 * Add a command button to click
 * Add a command button to click
 * Called when the command button is clicked
 * Called when the command button is clicked
 * Three nested class to PemStatus cause the form object not to be released
 * Remove these lines for form to operate as expected
 * Remove these lines for form to operate as expected

Note that the form does not close. To close it, type the following in the Command window:

CLEAR ALL

Additional query words: KBDSE

Keywords: kbbug kbfix kbcontainer kbctrl kbvs600sp3fix KB221740

-

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

© Microsoft Corporation. All rights reserved.