PRB: Multiple-Line WAIT WINDOW Display Problems

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

SYMPTOMS

When two WAIT WINDOW commands are issued from a program, one after the other, if each command displays a different number of lines in the wait window and if the first command has the NOWAIT clause, the wait window that is activated last is not displayed properly.

RESOLUTION

To work around this behavior, do one of the following:

  • Insert the WAIT CLEAR command between the two WAIT WINDOW commands.

    -or-

  • Remove the NOWAIT clause from the first WAIT WINDOW command.

MORE INFORMATION

The following two code examples further explain this situation.

Example 1

The following code example illustrates the behavior of the second wait window when it is defined to display more lines than the first window.

   WAIT WINDOW NOWAIT "WinOne Line1"+CHR(13)+"WinOne Line2"
   WAIT WINDOW "WinTwo Line1"+CHR(13)+"WinTwo Line2" ;
               +CHR(13)+"WinTwo Line3"

When the above code is executed, the second wait window takes on the characteristics of and displays the same number of lines as the first wait window. Starting with the first line, the second wait window displays only as many lines as are displayed by the first wait window; the rest of the lines are not displayed. Therefore, "WinTwo Line1" and "WinTwo Line2" are displayed, whereas "WinTwo Line3" is not.

Example 2

The following code example illustrates the behavior of the second wait window when it is defined to display fewer lines than the first window.

   WAIT WINDOW NOWAIT "WinOne Line1"+CHR(13)+"WinOne Line2" ;
                    +CHR(13)+"WinOne Line3"
   WAIT WINDOW "WinTwo Line1"+CHR(13)+"WinTwo Line2"

When the above code is executed, the second window is the same size as the first window and displays extra blank lines. In the second wait window, the number of "Displayed Lines+Blank Lines" is the same as the total number of lines displayed by the first wait window. Therefore, the second wait window will display "WinTwo Line1", "WinTwo Line1" and a blank line.

NOTE: In FoxPro versions 2.5a and 2.5b for MS-DOS, both of the above code examples display only the last line of the second wait window. This behavior is the same whether both WAIT WINDOW commands display the same or a different number of lines.


Additional reference words: FoxDos FoxWin 2.50a 2.50b

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.