home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol11n01.zip
/
ABOUT.PRG
next >
Wrap
Text File
|
1991-08-29
|
2KB
|
73 lines
***********************************************************************
* ABOUT.PRG FoxPro 1.02
* Demonstrate hidden mouse buttons and scrolling window messages
***********************************************************************
SET ECHO OFF
SET TALK OFF
CLEAR
pcmag="PC Magazine PC Magazine PC Magazine PC Magazine PC Magazine "+;
"PC Magazine PC Mag"
@ 0,0,24,79 BOX
i = 1
DO WHILE i <=23
@ i,1 SAY pcmag
i = i + 1
ENDDO
oldc = SET('CURSOR')
SET CURSOR OFF
phrase = "*** PC Magazine Databases *** PC Magazine Databases "
phrase = phrase + "*** PC Magazine Databases *** PC Magazine Databases ***"
DEFINE WINDOW mbox FROM 6,15 TO 16,64 DOUBLE SHADOWS COLOR SCHEME 5
ACTIVATE WINDOW mbox
DO FILLWIN && Fill window with text
x = INKEY(10,"M") && Pause for 10 seconds,
&& check for mouse click
IF x == 151 && If mouse was single clicked
row = MROW() && Get mouse row position
col = MCOL() && Get mouse column position
* Check mouse position, to see if it was clicked on "hidden button"
IF row < 2 .AND. col < 2 .AND. row <> -1 .AND. col <> -1
width = WCOLS() && Get width of the window
* If phrase is shorter than window width, pad it with spaces
IF LEN(phrase) < width
phrase = LEFT(phrase + SPACE(width), width)
ENDIF
midrow = INT(WROWS()/2) && Pick the middle row
DO WHILE .T.
@ midrow-1,0 SAY SPACE(width) COLOR W+/R
@ midrow +1,0 SAY SPACE(width) COLOR W+/R
@ midrow, 0 SAY LEFT(phrase,width) COLOR W+/R
phrase = SUBSTR(phrase,2) + LEFT(phrase,1) && Move front to back
delay = INKEY(.1,"M") && Short delay, get click or key
IF delay != 0 && Quit with any keypress or click
DO FILLWIN
EXIT
ENDIF
ENDDO
ENDIF
ENDIF
RELEASE WINDOW mbox && Release the window
SET CURSOR &oldc && Restore cursor setting
CLEAR
RETURN
PROCEDURE FILLWIN
CLEAR
@ 1,16 SAY "The About Box"
@ 3,8 SAY "Can you find the hidden button?"
@ 5,17 SAY "PC Magazine"
@ 7,19 SAY "Databases"
RETURN