PRB: Icons for Minimized Windows Disappear After ZOOM WINDOW

Last reviewed: June 27, 1995
Article ID: Q100806
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS

The icons used for minimized windows may seem to disappear at various points in the program when the ZOOM WINDOW <window_name> MINIMIZE command is used.

For example, if the display mode is set to VGA50 and window icons are placed on the bottom line of the screen using the ZOOM WINDOW command, the icons will be visible on the bottom line, even if the video mode changes from 50 lines to 25 lines. However, if the ZOOM WINDOW command is used to minimize the window AFTER the VGA25 mode is selected, the icons seem to disappear.

CAUSE

In VGA50 mode, 50 lines are available for program output, including icons. If an icon is placed on the bottom line (line 50) and the video mode is then changed to VGA25, only 25 lines are available for icon placement. If the same ZOOM WINDOW command is issued, the icon seems to disappear, since it has now been placed on line 50 of a 25-line screen and is no longer on the visible portion of the screen.

This behavior occurs only when the ZOOM WINDOW command is used. Maximizing and minimizing the window by using the window controls results in the icon being placed in its original position on the bottom line, regardless of the video mode selected.

RESOLUTION

To avoid this problem, make sure the specified screen position falls between the values of WROWS() and WCOLS() to ensure that the icons will be placed on the visible portion of the screen.

The following program will place the minimized icon on the screen regardless of the video mode used:

   DEFINE WINDOW TEST FROM 1,1 TO 20,50
   ACTIVATE WINDOW TEST SAME
   ZOOM WINDOW TEST MIN AT WROWS(),1

STATUS

This is the expected program behavior for FoxPro.

MORE INFORMATION

The following program illustrates the behavior described above:

   DEFINE WINDOW TEST FROM 1,1 TO 20,50
   ACTIVATE WINDOW TEST SAME
   SET DISPLAY TO VGA50
   ZOOM WINDOW TEST MIN AT 50,1
   WAIT WINDOW 'Minimized  50,1 in VGA50 mode.'
   SET DISPLAY TO VGA25
   ZOOM WINDOW TEST MIN AT 50,1        && Icon seems to disappear.
   WAIT WINDOW 'Minimized at 50,1 in VGA25 mode.'
   ZOOM WINDOW TEST MIN AT 38,1        && Icon now visible at bottom.
   WAIT WINDOW 'Minimized at 38,1 in VGA25 mode.'
   RELEASE WINDOW TEST


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.