home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
clipper
/
c50xp300.a01
/
XPDEMO.ARJ
/
XPINKEY.PRG
< prev
next >
Wrap
Text File
|
1992-10-01
|
1KB
|
40 lines
* ------------------------------------------------------------------------
* Module......: XPINKEY.PRG
* Title.......: INKEY part of the Expand Library Demonstration Program
* Author......: Pepijn Smits.
* Date........: July/August 1992
* Copyright...: (c)1992 by Softwarebureau Pepijn Smits
* Notes.......: Clipper 5.01 Demo of the Expand Library
* Some general Inkey functions: the Own Inkey() handler
* See XPDEMO.RMK For Compile and Link instructions.
* ------------------------------------------------------------------------
Function XPdemoInkey(n)
/***
* The Inkey Handler for the XPDEMO program
*/
Local i,nKey
if N == NIL // We've gotta continue right away!
UpdateClock()
nKey := Inkey()
elseif N == 0 // Wait until Key is Pressed..
While (nKey := Inkey()) == 0
UpdateClock()
end
else // Wait n seconds for a Key..
i := n
While ((nKey := Inkey(1)) == 0) .and. (i>0)
UpdateClock()
i--
end
end
Return (nKey)
Static Function UpdateClock()
Local c := SetColor()
MenuColor()
XPdisplay(0,MaxCol()-7,Time())
SetColor(c)
XPcolor()
Return (NIL)