Microsoft KB Archive/100806

{| = PRB: Icons for Minimized Windows Disappear After ZOOM WINDOW =
 * width="100%"|

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  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
 * }