Microsoft KB Archive/189721

= BUG: ZOOM WINDOW MIN Does Not Minimize User-Defined Window =

Article ID: 189721

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 Q189721



SYMPTOMS
A user-defined window cannot be minimized after it has been defined unless it is active.



RESOLUTION
The resolution is to assign the "name" property to the window and set the windowstate property of the window to "1" prior to activating the window. The code for the resolution is below. Remove the ampersands (&&) to view the correct behavior.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



MORE INFORMATION
The Help file states the following in the ZOOM WINDOW command:

A user-defined window can be minimized after it is defined. It doesn't have to be activated before you change its size.

In the example below, the window does not minimize unless the commented code is added.

Steps to Reproduce Behavior
Run the following sample code: DEFINE WINDOW WinTest FROM 0,0 TO 40,40 TITLE "Test" ; CLOSE FLOAT SYSTEM ZOOM && NAME xCorrected ZOOM WINDOW WinTest MIN && xCorrected.WINDOWSTATE=1 ACTIVATE WINDOW WinTest *-- End of code

