home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 17.8 KEYBOARD example
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #include "INKEY.CH"
-
- LOCAL mcode :=space(8)
- memvar getlist
- set key K_F9 to look_cust
-
- @ 10,10 get mcode pict "!!!!!!!!"
- read
- if lastkey() <> K_ESC
- *
- * Further processing ......
- *
- endif
- return NIL
-
- function look_cust(cProc,nLine,cVar)
- LOCAL back_scr := savescreen( 8,20,20,60 )
- LOCAL send_back
- Env_stack(.T.)
- Pushdbf()
- select CUSTOMER
- dispbox(8, 20, 20, 60, 2)
- Browse(9, 21, 19, 59)
- send_back := ( lastkey() <> K_ESC )
- Popdbf()
- Env_stack(.F.)
- restscreen(8, 20, 20, 60,back_scr)
- if send_back
- keyboard chr(K_CTRL_Y) + CUSTOMER->id_code + chr(K_ENTER)
- endif
- return NIL
-
- // end of file CHP1708.PRG
-