home *** CD-ROM | disk | FTP | other *** search
- *:*********************************************************************
- *:
- *: Program: PROFIND.PRG
- *:
- *: System: ProDemo Searching Example
- *: Author: Fox Software, Inc.
- *: Copyright (c) 1989, Fox Software, Inc.
- *: Last modified: 10/05/89 14:00
- *:
- *: Uses: PRODEMO.DBF
- *:
- *: Notes: This routine demonstrates how small windows
- *: can be used in lieu of buttons and how
- *: easy (and fast) it is to manipulate arbitrary
- *: size memo fields. It operates on the database
- *: constructed by PROBUILD.PRG.
- *:
- *: Documented 10/05/89 at 14:01 FoxDoc version 2.0
- *:*********************************************************************
- IF AT('PRODEMO',DBF())=0
- USE prodemo
- ENDIF
- SET TALK OFF
- CLEAR
- string = SPACE(20)
- @ 2,2 SAY 'Search for:' GET string
- READ
- string = ALLTRIM(string)
- IF LEN(string)=0
- RETURN
- ENDIF
- DEFINE WINDOW stop FROM 2,60 TO 2,70 NONE COLOR W+/R
- DEFINE WINDOW go FROM 2,40 TO 2,50 NONE COLOR W+/G
- DEFINE WINDOW search FROM 5,5 TO 15,60 TITLE "Search Window";
- SYSTEM FLOAT GROW CLOSE ZOOM COLOR SCHEME 8
- bytes = 0
- SCAN
- @ 3, 2 SAY ' Module: '+name
- bytes = bytes + LEN(source)
- @ 3, 40 SAY 'Bytes scanned: '+STR(bytes)
- s = AT(string, source)
- IF s > 0
- ACTIVATE WINDOW stop
- ? ' Stop'
- ACTIVATE WINDOW go
- ? ' Go'
- ACTIVATE SCREEN
- MODIFY MEMO source RANGE s,s+LEN(string) WINDOW search SAVE
- IF WONTOP() = 'STOP'
- EXIT
- ENDIF
- DEACT WINDOW stop
- DEACT WINDOW go
- ENDIF
- ENDSCAN
- CLOSE MEMO ALL
- CLEAR WINDOWS
-
-