home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / QWINDO.ZIP / POPMENU.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-01-01  |  1.4 KB  |  34 lines

  1. '********************************************************************
  2. 'POPMENU.BAS - A SAMPLE POP-UP MENU EXAMPLE
  3. '********************************************************************
  4. REM $DYNAMIC
  5. DEFINT A-Z              'Make all variables integers by default.
  6. DIM a%(2000)            'Dimension an integer array for our window.
  7. CALL QWINIT(4)          'Need to call this command before using any QW commands.
  8. CLS                     'Clear the screen.
  9.  
  10. DIM SHARED menu$(10)    'Define String array to hold menu items
  11. style = 2               'Make menu border double lined.
  12. borderattr = &H47       'Set attribute for border = White on Red
  13. charattr = &H47         'Set attribute for characters = White on Red too.
  14. x1 = 25                 'Begin at column 25.
  15. y1 = 10                 '& Row 10
  16. options = 4             'Set # of items in menu = 4
  17. '---- Initialize menu items from data statements ----
  18. menu$(0) = "Title"              'Array(0) = Menu title.
  19. menu$(1) = " Menu Option Number 1 "     'Array(1) = First menu item.
  20. menu$(2) = " Menu Option Number 2 "
  21. menu$(3) = " Menu Option Number 3 "
  22. menu$(4) = " Menu Option Number 4 "
  23. CALL POPMENU(result, kb, style, borderattr, charattr, x1, y1, options, VARPTR(menu$(0)))
  24. CALL MHIDE: LOCATE 15, 1
  25. IF result = 0 THEN
  26.    PRINT "No selection made."
  27. ELSE
  28.    PRINT "You've selected option"; result
  29. END IF
  30. PRINT " Press Any To End"
  31. WHILE INKEY$ = "": WEND
  32. END
  33.  
  34.