Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : LIGHTBAR.ZIP
Filename : LIGHTBAR.PRG

 
Output of file : LIGHTBAR.PRG contained in archive : LIGHTBAR.ZIP

*** Lightbar demonstration program
*** Author: Tim Stinar - WordTech Systems (415) 254-0900
***

SET TALK OFF
CLEAR

WSET WINDOW INHELP TO 8,15,16,65 COLOR W/R,W/B,W/G DOUBLE
WSELECT 1
WUSE INHELP && define and open window

MINKEY= 0
VAR1 = 'MOLAR'
VAR2 = 'INCISOR'
VAR3 = 'BICUSPID'
MORE = .T.

DO WHILE MORE
CLEAR
@ 2,1 SAY VAR1
@ 4,1 SAY VAR2
@ 6,1 GET VAR3 && 'GET' is used for reverse video effect

DO WHILE .NOT. MINKEY=13 && 13 is the INKEY value for
STORE INKEY() TO MINKEY
IF MINKEY=24 && 24 is the INKEY value for cursor down
DO CASE
CASE ROW()=6
@ 6,1 SAY VAR3 && use 'SAY' to write over the previous
@ 2,1 GET VAR1 && 'GET' field, in order to remove the
CASE ROW()=2 && reverse video effect, and vice versa
@ 2,1 SAY VAR1
@ 4,1 GET VAR2
CASE ROW()=4
@ 4,1 SAY VAR2
@ 6,1 GET VAR3
ENDCASE
ENDIF
IF MINKEY=5 && 5 is the INKEY value for cursor up
DO CASE
CASE ROW()=6
@ 6,1 SAY VAR3
@ 4,1 GET VAR2
CASE ROW()=2
@ 2,1 SAY VAR1
@ 6,1 GET VAR3
CASE ROW()=4
@ 4,1 SAY VAR2
@ 2,1 GET VAR1
ENDCASE
ENDIF
ENDDO
DO CASE
CASE ROW()=6
CLEAR
? 'ROW 3 SELECTED'
CASE ROW()=2
CLEAR
? 'ROW 1 SELECTED'
CASE ROW()=4
CLEAR
? 'ROW 2 SELECTED'
ENDCASE
WAIT
@ ROW(), COL() SAY 'MORE? (Y/N)' GET MORE
READ
MINKEY=0
ENDDO
WCLOSE