Microsoft KB Archive/190313

= PRB: Form QueryUnload Fires Before the Activate Event =

Article ID: 190313

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * 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 Q190313



SYMPTOMS
Under certain conditions, the QueryUnload event of a form fires before the Activate event. If code in the Activate event of a form takes some time to execute, the QueryUnload event fires before the code in the Activate event.



STATUS
Microsoft has confirmed this to be a problem 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
  Create a form and add the following code to the Activate event of the form: ? "Inside the Activate event." *DEBUGOUT PROGRAM FOR i = 1 TO 5000 SET MESSAGE TO ALLTRIM(STR(i)) NEXT i   Add the following code to the QueryUnload event of the form: ? "Inside the QueryUnload event." *DEBUGOUT PROGRAM WAIT WINDOW "Inside the QueryUnload Event."  Run the form and click the Command window to remove focus from the form. Now, click the Close control to close the form. Notice that the Activate event fires, then the QueryUnload event fires. Unremark the two DEBUGOUT commands and remark the WAIT WINDOW command. Open the Debugger and note that in the Output window of the Debugger the QueryUnload event fires after the Activate event.

Additional query words: FxprgClassoop FxtoolFormdes kbvfp600

Keywords: kbprb KB190313

-

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

© Microsoft Corporation. All rights reserved.