home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
database
/
vpi1_303.arj
/
MENU1.PRG
< prev
next >
Wrap
Text File
|
1991-12-31
|
2KB
|
68 lines
***************************************************************************
** MENU1.PRG
** (C) Copyright 1990-92, Sub Rosa Publishing Inc.
**
** A demonstration program provided to VP-Info users.
** This program may be copied freely. If it is used in commercial code,
** please credit the source, Sub Rosa Publishing Inc.
**
** MENU1 demonstrates the use of the MENU() function along with a variety
** of Info commands and functions.
**
** MENU1 displays a menu, determines the choice made, and reports
** the selection.
**
** MENU1 is compatible with all current versions of VP-Info.
**
** Sid Bursten and Bernie Melman
***************************************************************************
window ;set window to full screen
erase ;erase screen
WINDOW 6,18,19,62 DOUBLE ;declare space for menu text
DO WHILE 1=1 ;put main menu in an infinite loop
ERASE ;clear window
TEXT
SAMPLE MAIN MENU
0. Exit to Sample Programs Menu
1. Branch 1 of sample program
2. Branch 2 of sample program
3. Branch 3 of sample program
4. Branch 4 of sample program
5. Exit to Conversational VP-Info
6. Return to Main Demonstration Menu
ENDTEXT
CURSOR 12,25 ; positions menu cursor over 1st character of 1st choice
selection=menu(6,37) ;six choices menu bar width 37
DO CASE
CASE selection=0
CHAIN samples
CASE selection=1
@ 20,21 say " You have selected option 1. "
RING
DELAY 1 ; wait one second
CASE selection=2
@ 20,21 say " You have selected option 2. "
RING
DELAY 1 ; wait one second
CASE selection=3
@ 20,21 say " You have selected option 3. "
RING
DELAY 1 ; wait one second
CASE selection=4
@ 20,21 say " You have selected option 4. "
RING
DELAY 1 ; wait one second
CASE selection=5
WINDOW ;reset window to full screen
ERASE ;clear screen
CANCEL
CASE selection=6
CHAIN demo
ENDCASE
ENDDO
*
* *** end of MENU1.PRG ***