home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DBT123S.ZIP / DBTPULDN.PRG < prev    next >
Text File  |  1990-07-22  |  4KB  |  115 lines

  1. *    DBTPULDN.PRG - Pulldown Menu System Demo
  2. *   (c) 1990    BERNATH COMPUTER    V 1.23S
  3. *   07/21/1990
  4.  
  5. CALL DBTOOLS WITH "15,3"
  6. HCHOICE = 1
  7. EXITNOW = .f.
  8. CALL DBTOOLS WITH "7,2,0,7,0"
  9. CALL DBTOOLS WITH "5,0,0,0,79,1"
  10. CALL DBTOOLS WITH "1,0,20,15,1,0,PULLDOWN MENU SYSTEM DEMONSTRATION"
  11. CALL DBTOOLS WITH "3,13,1,22,77,1,3,2,0,1"
  12. set color to b/bg,+bg/n,w
  13. @ 14,2 say "This is example of a pulldown menu system using dBTools. The horizontal"
  14. @ 15,2 say "bar menu options may be selected with arrow keys or 1st letter keystrokes"
  15. @ 16,2 say "to pull down the underlying vertical bar menus. Once a vertical menu is"
  16. @ 17,2 say "showing, an adjacent vertical menu may be selected with the left and right"
  17. @ 18,2 say "arrow keys. Alternatively, pressing the hotkey combination indicated on the"
  18. @ 19,2 say "horizontal menu will jump right into that vertical menu. Inside a vertical"
  19. @ 20,2 say "menu, up and down arrow keys or 1st letter select the vertical option. ESC"
  20. @ 21,2 say "pops you back up to the horizontal menu."
  21. set color to w/b
  22. do while .not. EXITNOW
  23.  
  24.    mMENUSTR="9,"+str(HCHOICE,2)+",2,2,7,0,0,7,  Data Entry (^D)  ;
  25.    ,  Reports (^R)  ,  Utilities (^U)  ,  Quit (^Q)  ,@"
  26.    call dbtools with mMENUSTR
  27.    HCHOICE = val(mMENUSTR)
  28.    do case
  29.        case HCHOICE = 0                         && ESC
  30.            EXITNOW = .t.
  31.  
  32.        case HCHOICE =1                          && DATA ENTRY
  33.          VCHOICE = 1
  34.          do while VCHOICE <> 0
  35.             call dbtools with "21,3,3,2,7,23,0,7,1,1"
  36.             mPARM="20,Y,"+str(VCHOICE,2)+",3,15,0,2,Scancodes,2. Opt 2,3. Opt 3,@"
  37.             call dbtools with mPARM
  38.             VCHOICE = val(mPARM)
  39.             do case
  40.                case VCHOICE = 0                 && ESC
  41.                case VCHOICE = 1
  42.                       do SHOW_SCAN
  43.                case VCHOICE = 99
  44.                    do TRAPIT with mPARM,HCHOICE,4,"HKPULDN"
  45.                    call dbtools with "19,3"
  46.                    exit
  47.                otherwise
  48.                   do popped with VCHOICE,"Data Entry"
  49.             endcase
  50.             call dbtools with "19,3"
  51.          enddo
  52.  
  53.        case HCHOICE = 2                         && REPORTS
  54.          VCHOICE = 1
  55.          do while VCHOICE<>0
  56.             call dbtools with "21,3,3,24,7,41,11,1,1,1"
  57.             mPARM="20,Y,"+str(VCHOICE,2)+",3,1,3,2,First Option,Second Option,Third Option,@"
  58.             call dbtools with mPARM
  59.             VCHOICE = val(mPARM)
  60.             do case
  61.                case VCHOICE = 0
  62.                case VCHOICE = 99
  63.                    do TRAPIT with mPARM,HCHOICE,4,"HKPULDN"
  64.                    call dbtools with "19,3"
  65.                    exit
  66.                otherwise
  67.                    do popped with VCHOICE,"Reports"
  68.             endcase
  69.             call dbtools with "19,3"
  70.          enddo
  71.  
  72.        case HCHOICE = 3                         && UTILITIES
  73.          VCHOICE = 1
  74.          do while VCHOICE <> 0
  75.             call dbtools with "21,3,3,42,7,61,15,5,1,1"
  76.             mPARM="20,Y,"+str(VCHOICE,2)+",3,12,0,2,First Option,Second Option,Third Option,@"
  77.             call dbtools with mPARM
  78.             VCHOICE = val(mPARM)
  79.             do case
  80.                 case VCHOICE = 0
  81.                 case VCHOICE = 99
  82.                    do TRAPIT with mPARM,HCHOICE,4,"HKPULDN"
  83.                    call dbtools with "19,3"
  84.                    exit
  85.                 otherwise
  86.                    do popped with VCHOICE,"Utilities"
  87.             endcase
  88.             call dbtools with "19,3"
  89.          enddo
  90.  
  91.        case HCHOICE = 4                         && QUIT
  92.  
  93.             call dbtools with "21,3,3,62,6,76,7,4,1,1"
  94.             VCHOICE = 1
  95.             mPARM="20,Y,"+str(VCHOICE,2)+",3,15,0,1,Main Menu,Dot Prompt,@"
  96.             call dbtools with mPARM
  97.             VCHOICE = val(mPARM)
  98.             do case
  99.                 case VCHOICE = 1
  100.                     EXITNOW = .T.
  101.                 case VCHOICE = 2
  102.                     call dbtools with "19,3"
  103.                     clear
  104.                     cancel
  105.                 case VCHOICE = 99
  106.                    do TRAPIT with mPARM,HCHOICE,4,"HKPULDN"
  107.             endcase
  108.             call dbtools with "19,3"
  109.    endcase
  110. enddo
  111.  
  112. EXITNOW=.f.
  113. CALL DBTOOLS WITH "14,3,0"
  114. return
  115.