home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP17.EXE / CHP1708.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  921 b   |  44 lines

  1. /*
  2.    Listing 17.8 KEYBOARD example
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. #include "INKEY.CH"
  12.  
  13. LOCAL mcode :=space(8)
  14. memvar getlist
  15. set key K_F9 to look_cust
  16.  
  17. @ 10,10 get mcode pict "!!!!!!!!"
  18. read
  19. if lastkey() <> K_ESC
  20.    *
  21.    * Further processing ......
  22.    *
  23. endif
  24. return NIL
  25.  
  26. function look_cust(cProc,nLine,cVar)
  27. LOCAL back_scr := savescreen( 8,20,20,60 )
  28. LOCAL send_back
  29. Env_stack(.T.)
  30. Pushdbf()
  31. select CUSTOMER
  32. dispbox(8, 20, 20, 60, 2)
  33. Browse(9, 21, 19, 59)
  34. send_back := ( lastkey() <> K_ESC )
  35. Popdbf()
  36. Env_stack(.F.)
  37. restscreen(8, 20, 20, 60,back_scr)
  38. if send_back
  39.    keyboard chr(K_CTRL_Y) + CUSTOMER->id_code + chr(K_ENTER)
  40. endif
  41. return NIL
  42.  
  43. // end of file CHP1708.PRG
  44.