ID: Q104886
The information in this article applies to:
In FoxPro for MS-DOS, when a RUN command is issued to execute external commands, the screen may flash for a brief moment while the command is executed. This might be an undesirable effect when there are active windows on the screen.
You can prevent the active windows from blinking when the RUN command is issued by using the following program. This program uses the ACTIVATE SCREEN command to change the focus to the desktop and the HIDE WINDOW SAVE command to save the image of the windows on the screen. It also requires that the STATUS BAR be OFF.
ON KEY LABEL F5 DO pnoblink
SET STATUS OFF && Status bar needs to be off
SET TALK OFF
DEFINE WINDOW win1 FROM 1,1 TO 10,34 && Defines two windows
* and activates them
@ 24,20 SAY "Press F5 to activate the MS-DOS command"
ACTIVATE WINDOW win1
@ 3,4 GET x DEFAULT 1
DEFINE WINDOW win2 FROM 11,1 TO 20,34
ACTIVATE WINDOW win2
@ 4,4 GET y DEFAULT 4
READ CYCLE
* Deactivates the windows
DEACTIVATE WINDOW win1
DEACTIVATE WINDOW win2
RELEASE WINDOW ALL
CLEAR
PROCEDURE pnoblink
ACTIVATE SCREEN && Changes the focus to the desktop
HIDE WINDOW ALL SAVE && Displays an image of the window on
* the desktop
WAIT WINDOW "Processing the DOS command... please wait" NOWAIT
RUN /0 DIR >test.txt && Directs the echoing of the command to
* a file
WAIT CLEAR
@ 24,20 CLEAR
@ 24,25 SAY "Press CTRL+W to exit the READ"
ACTIVATE WINDOW win1
Additional reference words: FoxDos 2.00 2.50 2.50a flicker scroll
KBCategory: kbprg kbcode
KBSubcategory:
Last Reviewed: April 18, 1995