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

 
Output of file : TEST.PRG contained in archive : STATWIN.ZIP
// A small test program to test STATWIN functions. Compile with /a/m/n.

PROCEDURE Main()

LOCAL nCount, nInKeyCode, nSize := 30000, cDefault := "W/B"

SETCOLOR ( cDefault )

CLEAR SCREEN

@ 24, 20 SAY "PRESS SPACE BAR TO MOVE ON TO NEXT EXAMPLE"

@ 1, 1 SAY "This is a default window, with a percent bar length of 25,"
@ 2, 1 SAY "using four characters -> ° ± ² Û"

StatInit ( 4, 10 )

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount )
nInKeyCode := INKEY() // --------------------------------------
IF nInKeyCode == 32 // This secition not normally coded!
SETCOLOR ( cDefault ) // Included here only to exit out of loop
EXIT // before it is finished (and to keep the
ENDIF // window from being erased.)
NEXT

@ 11, 1 SAY 'This is a "large" default window, with a percent bar length of 50,'
@ 12, 1 SAY "using two characters -> Ý Û"

StatInit ( 14, 10, .T. ) // Note: large window flag set

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount )
nInKeyCode := INKEY()
IF nInKeyCode == 32
SETCOLOR ( cDefault )
EXIT
ENDIF
NEXT

CLEAR SCREEN

@ 24, 20 SAY "PRESS SPACE BAR TO MOVE ON TO NEXT EXAMPLE"

@ 1, 1 SAY 'This is a default window with the "show estimated time" flag set.'

StatInit ( 4, 10 )

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount, , .T. ) // Note: estimate flag set
nInKeyCode := INKEY()
IF nInKeyCode == 32
SETCOLOR ( cDefault )
EXIT
ENDIF
NEXT

@ 12, 1 SAY 'This is a "large" window with a header message and the '
@ 13, 1 SAY '"show estimated time" flag set.'

StatInit ( 15, 10, .T. )

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount, "This space for rent -- We are this far ->", .T. )
nInKeyCode := INKEY() // Note above: message string defined
IF nInKeyCode == 32
SETCOLOR ( cDefault )
EXIT
ENDIF
NEXT

CLEAR SCREEN

@ 24, 20 SAY "PRESS SPACE BAR TO MOVE ON TO NEXT EXAMPLE"

@ 1, 1 SAY 'This is a default window with the user-defined window colors.'

StatInit ( 4, 10 )

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount, , , "R/BG" )
nInKeyCode := INKEY()
IF nInKeyCode == 32
SETCOLOR ( cDefault )
EXIT
ENDIF
NEXT

@ 12, 1 SAY 'This is a "large" window with the same window colors plus user-defined'
@ 13, 1 SAY 'percent bar template and percent bar "fill" colors.'

StatInit ( 15, 10, .T. )

nInKeyCode := 0

FOR nCount = 1 TO nSize
StatWin ( nSize, nCount, , , "R/BG", "W", "RB+/W" )
nInKeyCode := INKEY()
IF nInKeyCode == 32
SETCOLOR ( cDefault )
EXIT
ENDIF
NEXT

CLEAR SCREEN

? "That pretty much covers all the possibilities! Enjoy!"

RETURN


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : STATWIN.ZIP
Filename : TEST.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/