Microsoft KB Archive/109151

{| = PRB: Closeable Window Does Not CLEAR READ When Closed =
 * width="100%"|

ID: Q109151

2.50 2.50a 2.50b | 2.00 2.50 2.50a 2.50b

WINDOWS         | MS-DOS kbprg kbprb The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

SYMPTOMS
When you define a window as closeable and use a READ command on that window, if a user clicks the close box in FoxPro for MS-DOS or chooses Close from the Control menu in FoxPro for Windows, the window will be deactivated but the READ command will not be cleared.

RESOLUTION
To clear the READ command, put a CLEAR READ command or a RETURN .T. command in the WINDOW DEACTIVATE clause of that window. When the user closes the window, the DEACTIVATE clause will execute and the READ command will be cleared. For example:

CLEAR CLEAR ALL x=SPACE(20) DEFINE WINDOW aaa FROM 1,1 TO 20,60 FLOAT CLOSE ACTIVATE WINDOW aaa @ 5,5 GET x  READ CYCLE DEACTIVATE testclose

Function Testclose if !WVISIBLE('aaa') clear read return .t.  else return .f.  endif Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b KBCategory: kbprg kbprb KBSubcategory: FxprgGeneral Keywords         : FxprgGeneral Version          : 2.50 2.50a 2.50b | 2.00 2.50 2.5 Platform         : MS-DOS WINDOWS
 * }