home *** CD-ROM | disk | FTP | other *** search
- '********************************************************************
- 'POPMENU.BAS - A SAMPLE POP-UP MENU EXAMPLE
- '********************************************************************
- REM $DYNAMIC
- DEFINT A-Z 'Make all variables integers by default.
- DIM a%(2000) 'Dimension an integer array for our window.
- CALL QWINIT(4) 'Need to call this command before using any QW commands.
- CLS 'Clear the screen.
-
- DIM SHARED menu$(10) 'Define String array to hold menu items
- style = 2 'Make menu border double lined.
- borderattr = &H47 'Set attribute for border = White on Red
- charattr = &H47 'Set attribute for characters = White on Red too.
- x1 = 25 'Begin at column 25.
- y1 = 10 '& Row 10
- options = 4 'Set # of items in menu = 4
- '---- Initialize menu items from data statements ----
- menu$(0) = "Title" 'Array(0) = Menu title.
- menu$(1) = " Menu Option Number 1 " 'Array(1) = First menu item.
- menu$(2) = " Menu Option Number 2 "
- menu$(3) = " Menu Option Number 3 "
- menu$(4) = " Menu Option Number 4 "
- CALL POPMENU(result, kb, style, borderattr, charattr, x1, y1, options, VARPTR(menu$(0)))
- CALL MHIDE: LOCATE 15, 1
- IF result = 0 THEN
- PRINT "No selection made."
- ELSE
- PRINT "You've selected option"; result
- END IF
- PRINT " Press Any To End"
- WHILE INKEY$ = "": WEND
- END
-
-