Set Clock, Set("Clock")
This command controls both the location and visibility of the system clock. It allows you to turn the clock on and off and to position it either on the status bar or anywhere you want on the screen.
Usage |
SET CLOCK ON | OFF SET CLOCK STATUS | TO [ nRow, nCol ] |
Parameter |
Value |
Meaning |
ON |
Turn on display of the system clock at its last location. |
|
OFF |
Turn off display of the system clock. |
|
STATUS |
Turn on display of the system clock in the status bar. |
|
nRow, nCol |
Numeric |
The position on the main FoxPro screen to display the system clock. Turns the clock on. |
Omitted |
Return the system clock to its default position in the upper right corner. Turns the clock on. |
In the default location, the clock makes some assumptions about the size of the VFP window. It's happiest when the VFP window is maximized, and may not show up at all or may be cut off if the window isn't maximized. Tamar habitually works with all her applications sized to fill the screen vertically, but not horizontally (and shortcuts on the rightmost section of her desktop)—in her default setup, the clock gets cut off. |
Example |
SET CLOCK ON && Make clock visible in last location SET CLOCK STATUS && Move the clock to the status bar SET CLOCK OFF && Turn the clock off SET CLOCK ON && Turn the clock on - in the status bar SET CLOCK TO 0,0 && Move the clock to the upper left corner * Have some fun with the clock =rand(-1) for nTimes=1 to 10 SET CLOCK TO SROWS()*RAND(),SCOLS()*RAND() =INKEY(1) endfor |
Usage |
cClockStatus = SET( "CLOCK" ) cClockPosition = SET( "CLOCK", 1 ) |
Example |
SET CLOCK ON ? SET("CLOCK") && Displays ON ? SET("CLOCK",1) && Displays the empty string SET CLOCK TO 0,0 ? SET("CLOCK",1) && Displays 0.000, 0.000 |
See Also |